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 "no-reply@domain.com". However I want it to say that the message is from "John Doe [no-reply@domain.com]" (as displayed in Outlook). How do I achieve that? At the moment I have: $headers = "From: John Doe [no-reply@domain.com]\r\n"; Which returns: User Joen Doe [johndoe@plesk-bsd.hosting.isx.net.nz] Please help, Thanks, Sam. Quote Link to comment 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... Quote Link to comment Share on other sites More sharing options...
forumnz Posted January 24, 2008 Author Share Posted January 24, 2008 Where is that? Quote Link to comment Share on other sites More sharing options...
phpSensei Posted January 24, 2008 Share Posted January 24, 2008 <?php ini_set("sendmail_from","website@hotmail.com"); ?> Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.