skyhrg Posted June 16, 2013 Share Posted June 16, 2013 Hi, I managed to set up a simple smtp with sendmail and gmail in the PHP mail function. The thing is, is it possible to change the "from" email address to a different one, than the gmail account I'm using? No matter which $from I assign, the from address is always my gmail account, which I am using to send mails. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/279225-php-mail-with-gmail-edit-from-email-address/ Share on other sites More sharing options...
trq Posted June 16, 2013 Share Posted June 16, 2013 You can set this in the headers passed as the 4th argument to mail though doing so will likely make you email look like spam to most clients. Quote Link to comment https://forums.phpfreaks.com/topic/279225-php-mail-with-gmail-edit-from-email-address/#findComment-1436228 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.