totoro001 Posted January 17, 2007 Share Posted January 17, 2007 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');ORmail('[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 More sharing options...
fiat Posted January 18, 2007 Share Posted January 18, 2007 Set some content headerssuch as$headers = "MIME-Version: 1.0\n";$headers .= "Content-type: text/html; charset=iso-8859-1\n";then mail in the format mail($to, $subject, $message, $headers); Link to comment https://forums.phpfreaks.com/topic/34651-sendmail-and-php-mail-issues/#findComment-163425 Share on other sites More sharing options...
totoro001 Posted January 18, 2007 Author Share Posted January 18, 2007 nope sorry, same error after adding the headers. Link to comment https://forums.phpfreaks.com/topic/34651-sendmail-and-php-mail-issues/#findComment-163743 Share on other sites More sharing options...
totoro001 Posted January 20, 2007 Author Share Posted January 20, 2007 so nobody's ever seen this error before? it's gotta be something with either the php.ini, or how php interacts with sendmail. Link to comment https://forums.phpfreaks.com/topic/34651-sendmail-and-php-mail-issues/#findComment-164802 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.