Jump to content

Sendmail and php mail() issues


totoro001

Recommended Posts

Alright, I'm trying to use php's mail() function to send mail (which in *nix -- in my case FreeBSD -- it uses sendmail) and I get the same error over and over when executing my php script via the command line: 
[quote]
"Recipient names must be specified"
[/quote]
and when i check the /var/log/maillog i get:
[quote]
"Jan 18 03:35:26 web1 sendmail[4436]: l0IBZQit004436: from=totoro001, size=730, class=0, nrcpts=0, sgid=<[email protected]>, relay=totoro001@localhost"
[/quote]
i thought it might be an issue with my php.ini file, but there's really not much for configuration when you're using sendmail:
[quote]
sendmail_path = /usr/sbin/sendmail
[/quote]
now for code, i'm just using the standard:
[quote]
mail('[email protected]', 'subject', 'message');
OR
mail('[email protected]', 'subject', 'message', null, '[email protected]');
[/quote]
i get the same recipient error each time.  i CAN however send mail from the command line using:
[quote]
echo "test body" | mail -s "test subject" [email protected]
[/quote]
so i know that sendmail is working (and the address i'm sending it to is NOT on the local machine).  any ideas?  any info you want from me that might help solve it?
Link to comment
https://forums.phpfreaks.com/topic/34651-sendmail-and-php-mail-issues/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.