Rifts Posted November 10, 2010 Share Posted November 10, 2010 using godaddy hosting and sending php email it sends fine but the "from" is like server.blab.la2345423 long crazy stuff how can I change who the email is from? thanks Link to comment https://forums.phpfreaks.com/topic/218334-probably-a-silly-question/ Share on other sites More sharing options...
simshaun Posted November 10, 2010 Share Posted November 10, 2010 Use SMTP to send your mail. When using the native sendmail program or mail function, the from address is going to be whatever the mailserver's name is. To get around that, you use SMTP to send email through an existing email account of your own. Link to comment https://forums.phpfreaks.com/topic/218334-probably-a-silly-question/#findComment-1132814 Share on other sites More sharing options...
BlueSkyIS Posted November 10, 2010 Share Posted November 10, 2010 1 and/or 2 options aside from smtp: 1. update php.ini to use a specific return-address, and/or 2. set the $headers in mail() to use a specified return-path, from, etc. Link to comment https://forums.phpfreaks.com/topic/218334-probably-a-silly-question/#findComment-1132823 Share on other sites More sharing options...
simshaun Posted November 10, 2010 Share Posted November 10, 2010 Just another tidbit... If modifying the actual sender address (this is different than the from address), be sure to use a sender address that is valid. Some mail servers reject email or flag it as spam if the sender is invalid. Link to comment https://forums.phpfreaks.com/topic/218334-probably-a-silly-question/#findComment-1132826 Share on other sites More sharing options...
Rifts Posted November 10, 2010 Author Share Posted November 10, 2010 could you give me a quick example of a valid $header? thanks for the input guys Link to comment https://forums.phpfreaks.com/topic/218334-probably-a-silly-question/#findComment-1132827 Share on other sites More sharing options...
simshaun Posted November 10, 2010 Share Posted November 10, 2010 How are you sending your mail? (code) Link to comment https://forums.phpfreaks.com/topic/218334-probably-a-silly-question/#findComment-1132831 Share on other sites More sharing options...
BlueSkyIS Posted November 10, 2010 Share Posted November 10, 2010 looks like a good example: http://www.htmlite.com/php029.php Link to comment https://forums.phpfreaks.com/topic/218334-probably-a-silly-question/#findComment-1132832 Share on other sites More sharing options...
Rifts Posted November 11, 2010 Author Share Posted November 11, 2010 im just sending mail like this mail($to, $subject, $msg) thanks bluesky that looks very helpful! Link to comment https://forums.phpfreaks.com/topic/218334-probably-a-silly-question/#findComment-1132884 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.