jeeva Posted March 14, 2007 Share Posted March 14, 2007 hi frnds, i have coded for sending mail to user for my application. Its working fine.. here my code $to="to address"; $subject="test"; $message="this is test message"; $from="test"; $server="server ip"; //ini set for mail ini_set("SMTP",$server); ini_set("sendmail_from",$from); //set the html header $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $mail=mail($to,$subject,$message,$headers); My problem is if i using two name (like $from="test test") in from address it doesn't work.i dont know y? can u tell me wts wrong with my code? Link to comment https://forums.phpfreaks.com/topic/42638-mail-problem/ Share on other sites More sharing options...
monk.e.boy Posted March 14, 2007 Share Posted March 14, 2007 $from="test; text 2; test 3"; I think you put semi colons to separate the froms. monk.e.boy Link to comment https://forums.phpfreaks.com/topic/42638-mail-problem/#findComment-206988 Share on other sites More sharing options...
jeeva Posted March 15, 2007 Author Share Posted March 15, 2007 No its not working...... Link to comment https://forums.phpfreaks.com/topic/42638-mail-problem/#findComment-207901 Share on other sites More sharing options...
brad Posted March 15, 2007 Share Posted March 15, 2007 ini_set("sendmail_from",$from); SHOULD READ ini_set('sendmail_from','$from'); TRY THAT. BRAD. Link to comment https://forums.phpfreaks.com/topic/42638-mail-problem/#findComment-207914 Share on other sites More sharing options...
monk.e.boy Posted March 15, 2007 Share Posted March 15, 2007 Actually how the hell can you send an email FROM two people? It doesn't even make sense! So I open my email, and it is from Dave and Jeff? I don't think so. monk.e.boy Link to comment https://forums.phpfreaks.com/topic/42638-mail-problem/#findComment-207928 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.