forumnz Posted January 24, 2008 Share Posted January 24, 2008 Hey, I am using the mail function to send an email from my site. If I have the email address in the From: part, then it says in the email that it's from "[email protected]". However I want it to say that the message is from "John Doe [[email protected]]" (as displayed in Outlook). How do I achieve that? At the moment I have: $headers = "From: John Doe [[email protected]]\r\n"; Which returns: User Joen Doe [[email protected]] Please help, Thanks, Sam. Link to comment https://forums.phpfreaks.com/topic/87655-small-mail-problem/ Share on other sites More sharing options...
phpSensei Posted January 24, 2008 Share Posted January 24, 2008 You have to also set this in your php.init file... Link to comment https://forums.phpfreaks.com/topic/87655-small-mail-problem/#findComment-448332 Share on other sites More sharing options...
forumnz Posted January 24, 2008 Author Share Posted January 24, 2008 Where is that? Link to comment https://forums.phpfreaks.com/topic/87655-small-mail-problem/#findComment-448337 Share on other sites More sharing options...
phpSensei Posted January 24, 2008 Share Posted January 24, 2008 <?php ini_set("sendmail_from","[email protected]"); ?> Link to comment https://forums.phpfreaks.com/topic/87655-small-mail-problem/#findComment-448344 Share on other sites More sharing options...
forumnz Posted January 24, 2008 Author Share Posted January 24, 2008 Can I use that in a script or do I have to edit php.ini? Thanks. Link to comment https://forums.phpfreaks.com/topic/87655-small-mail-problem/#findComment-448384 Share on other sites More sharing options...
phpSensei Posted January 26, 2008 Share Posted January 26, 2008 Can I use that in a script or do I have to edit php.ini? Thanks. Create a new php file, and just run it on a script. Link to comment https://forums.phpfreaks.com/topic/87655-small-mail-problem/#findComment-449433 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.