RE: [PHP] mail
| From: | Brad Fuller | Date: | Tue, 13 Mar 2007 20:32:32 +0000 |
| Subject: | RE: [PHP] mail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250487@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Dani Dws [mailto:rodio_r@hotmail.co.uk]
> Sent: Tuesday, March 13, 2007 2:35 PM
> To: php-general@lists.php.net
> Subject: [PHP] mail
>
> I just want to know if the mail function works from a localhost (local
> server)?
>
> I've checked my php.ini all the setting are right but the mail function is
> not sending any mail, any idea?
>
> best regards.
Provided you have mail server software installed on your machine (i.e.
sendmail) it should work.
shell> locate sendmail
Verify that the path to sendmail in your php.ini file is correct.
<?php phpinfo(); ?>
You should see something like:
sendmail path /usr/sbin/sendmail -t -i
If this doesn't match, you need to update your php.ini file.
If all is correct, make sure your IP isn't listed in any SPAM database.
http://www.dnsstuff.com/
It is also worth noting that some mail servers may reject email messages
coming from a server whose reverse DNS does not match the sender's address.
Make sure your mail is coming from <you@yourISP.com>.
In some cases I have also encountered certain mail servers (though they'd
likely deny it) will silently discard messages sent from dynamic/residential
IP blocks.
You might consider configuring your mail server to relay messages through
your ISP's SMTP server, though I wouldn't recommend this if you're planning
on doing any bulk mailing and are fond of your account with your ISP ;)
HTH,
Brad