Drezard Posted July 30, 2009 Share Posted July 30, 2009 When I run this script here: <?php $senderName = "System"; $senderEmail = "[email protected]"; $mailTo = "[email protected]"; $mailHeader = "From: " . $senderName . " <" . $senderEmail . ">\r\n"; $mailSubject = "Callback\r\n"; $mailMessage = "Test Msg\n"; if ((mail($mailTo, $mailSubject, $mailMessage, $mailHeader)) != 1) { echo "The callback failed to send.\n"; } else { echo "Mail sent successfully.\n"; } ?> It sends an email to my account and I get the email. But it has this big ugly header at the top: Message-Id: <[email protected]> Date: Thu, 30 Jul 2009 21:59:05 +1000 (EST) Return-Path: [email protected] X-OriginalArrivalTime: 30 Jul 2009 01:57:47.0925 (UTC) FILETIME=[23368450:01CA10B9] How do I get rid of this? Daniel Link to comment https://forums.phpfreaks.com/topic/168079-mail-header/ Share on other sites More sharing options...
fooDigi Posted July 30, 2009 Share Posted July 30, 2009 i could be wrong, but it's most likely your email client doing that... i just tried the code and sent to an exchange server and to gmail and both were fine. what type of email are you sending to? Link to comment https://forums.phpfreaks.com/topic/168079-mail-header/#findComment-886510 Share on other sites More sharing options...
fooDigi Posted July 30, 2009 Share Posted July 30, 2009 try sending it to different emails, yahoo, gmail, etc.. and see if it still remains... Link to comment https://forums.phpfreaks.com/topic/168079-mail-header/#findComment-886514 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.