You are here: Re: Problems with the function "mail" of PHP. « PHP Programming Language « IT news, forums, messages
Re: Problems with the function "mail" of PHP.

Posted by Petr Vileta on 11/27/06 03:04

"Gordon Burditt" <gordonb.fgp8r@burditt.org> píše v diskusním příspěvku
news:12mk8pgk4l95512@corp.supernews.com...
> >I have a problem with the function "mail". It returns "true"
>>but supposed recipients receive nothing. My code is as follows:
>>
>>$to = $form[address1];
>>$subject = "E-mail Verification";
>>$body = 'The first line\n';
>>$body .= 'The second line.';
>>$headers = 'From: webmaster@example.com';
>>$res = mail($to, $subject, $body, $headers);
>
> The domain example.com has no MX records and no mail server running
> on the host pointed at by the A record. This is more than sufficient
> to drop any mail claiming to be from example.com as SPAM.
>
Here you see the reason of your problem :-)
For example if you are sending mail from domain www.superhost.com then you
must use some like
$headers = 'From: gordon@superhost.com';
In other word the part of mail after "@" must be the same as your domain
name after "www."
--

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация