I am sending email with the PHP mail function. It works the way it should, except that all mail clients display an empty From field. This is how I use this function:
mail( 'mail@example.com', 'Example subject', $msg,
implode( '\r\n', array( 'Content-Type: text/html; charset=UTF-8', 'From: test@example.com') ) );
As I said, everything works fine, except for the From field field, everything is empty when a message arrives. Any idea why this is happening?
source
share