RE: [PHP] Sending mail with php-
| From: | Duffy, Scott E | Date: | Wed, 11 Jan 2006 21:54:59 +0000 |
| Subject: | RE: [PHP] Sending mail with php- | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-228499@lists.php.net to get a copy of this message | ||
This is what I use to send email via php. I have sent hundreds at once.
$fromname="Cohen, Dotan";
$fromaddress="dotan@lyricslist.com";
$subject ="Subject";
$message="message body";
$from=" dotan@lyricslist.com";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
$headers .= "X-Mailer: php\n";
$headers .= "From: \"".$fromname."\"
<".$fromaddress.">\n";
//return mail($toaddress, $subject, $message, $headers);
$toAddress='dotancohen@gmail.com';
mail($toAddress,$subject,$message,$headers);
good luck
Scott Duffy
-----Original Message-----
From: Dotan Cohen [mailto:dotancohen@gmail.com]
Sent: Wednesday, January 11, 2006 2:49 PM
To: Sameer N Ingole
Cc: php-general@lists.php.net
Subject: Re: [PHP] Sending mail with php-
On 1/10/06, Sameer N Ingole <strike@proscrutiny.com> wrote:
> Dear Dotan,
> Dotan Cohen wrote:
>
> >On my home Fedora Core 4 box I run Apache 2.0. Sometimes when sending
> >mail with php no mail is delivered, and I find this in the logs:
> >
> ><<< 550-Verification failed for <apache@localhost.localdomain>
> ><<< 550-unrouteable mail domain "localhost.localdomain"
> ><<< 550 Sender verify failed
> >
> You are getting this error because apache@localhost.localdomain cannot
> be reached from Internet and whoever you are sending mail to may have
> something called sender check. This verifies if the sender of this
mail
> is reachable. This avoids spammers to send mails using unreachable
> addresses. Also he may be checking spf-record for your From: domain on
> mail envelop.
>
> >
> >So I changed the only email address in httpd.conf to:
> >ServerAdmin dotan@lyricslist.com
> >
> What error you are getting after you change address in apache and try
> sending mail after restarting apache?
>
> >
> >But I still get the error! I did restart apache and even went so far
as to
> >reboot the machine. If I cannot modify the parameter within apache,
> >then where should I modify it? Within php? Within sendmail?
> >
>
Excact same error. Actually, this was working fine until recently. I
use the script (homemade) to send out the http://lyricslist.com
monthly newsletter every month- and only this month am I having
problems. No changes made to apache, php, or sendmail except the
regular updates. Could an update have broken this?
Dotan Cohen
http://technology-sleuth.com/short_answer/what_is_hdtv.html
876