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