EchoFool Posted May 15, 2010 Share Posted May 15, 2010 Hey, When ever usesr recieve an email from my server their email shows: From: Nobody ([email protected]) Why is this? Other companies and sites don't get this problem i wanted it to show my Business Name so it was easy to identify My script for the mail sent is: $subject = "Notification"; $headers = 'Content-type: text/html; charset=UTF-8'; $message = "Your account has changed its email! <br><br>All emails will now be directed to this email: <b>$EmailTemp</b> <br><br>Thanks"; mail($EmailTemp, $subject, $message, $headers); What did i get wrong? Or more like what did i miss ? Link to comment https://forums.phpfreaks.com/topic/201821-sending-emails-issue/ Share on other sites More sharing options...
CodeMaster Posted May 15, 2010 Share Posted May 15, 2010 www.php.net/mail Your header information is not set: $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); Link to comment https://forums.phpfreaks.com/topic/201821-sending-emails-issue/#findComment-1058884 Share on other sites More sharing options...
EchoFool Posted May 15, 2010 Author Share Posted May 15, 2010 www.php.net/mail Your header information is not set: $headers = 'From: [email][email protected][/email]' . "\r\n" . 'Reply-To: [email][email protected][/email]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); With that does that mean i cannot use $headers = 'Content-type: text/html; charset=UTF-8'; ? Link to comment https://forums.phpfreaks.com/topic/201821-sending-emails-issue/#findComment-1058937 Share on other sites More sharing options...
CodeMaster Posted May 16, 2010 Share Posted May 16, 2010 You forgot to declare the From parameter in the headers. You can use the content-type parameters as well. Link to comment https://forums.phpfreaks.com/topic/201821-sending-emails-issue/#findComment-1059059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.