Monday 25 June 2018

sendmail - PHP sendmail_path Flags -- Not working correctly?

I recently switched hosts and am having an issue with the mail() function.



On my previous host, I could define the from address through the header by doing this:



mail("test@email.com","subject","message","From: fake@email.com");


On the new host however, it ignores the From header. Instead it sends from a default email account something@something.myhost.com.



In php.ini, the sendmail_path is set as follow: sendmail_path = /usr/sbin/sendmail -t -i




As far as I can tell from researching, this should allow me to set the from address in the header.



Any ideas?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...