onlyican Posted September 25, 2006 Share Posted September 25, 2006 okI have a register formon completionI send a default email to themBUTHotmail does not receive these messages, not even in Junk Box(Well my hotmail account dont)So I wanted to check the mail headers, before I make this new version of the site liveI am using the following mail headers[code]<?php$headers = 'MIME-Version: 1.0' . "\r\n";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";$headers .= 'To: '.$name.' <'.$email.'>,' . "\r\n";$headers .= 'From: MySite<info@MySite.net>' . "\r\n";?>[/code]The body of the email looks something like[code]<?phpecho "<html>\n"."<head>\n"."<title>".$subject."</title>\n"."</head>\n"."<body>\n"."My email Body, only using STRONG tag and A HREF tag\n"."</body>\n"."<html>\n";//$subject is the $subject for the message, keeping them the same, I am just using that var?>[/code]I am using "Office Mail" on my local machine to test emails (Thats why the mail header is jamie@local.com, it only works on my machineOn there, I viewed the headers, and they are[quote]Date: Mon, 25 Sep 2006 15:15:48 +0200Subject: Registration with My Site NetworkMIME-Version: 1.0Content-type: text/html; charset=iso-8859-1To: Jamie <jamie@local.com>,From: MySite<info@MySite.net>Message-ID: <20060925151548084977122>[/quote]Everything looks ok to me, but I am no expertWhat do u tink Quote Link to comment https://forums.phpfreaks.com/topic/21973-checking-mail-headers/ Share on other sites More sharing options...
HuggieBear Posted September 25, 2006 Share Posted September 25, 2006 Try removing the [b]To[/b] field from the headers... Hotmail doesn't like that.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/21973-checking-mail-headers/#findComment-98131 Share on other sites More sharing options...
SharkBait Posted September 25, 2006 Share Posted September 25, 2006 Usually what I find is that when people are mailing through PHP its reply-to is either set up funny or that the Hotmail server sees the email as being redirected (spoofed).Say your webhost is Myhost.com but your URL is MySite.com. MySite.com is relaying through Myhost.com and MyHost.com might not be re-writing the headers correctly and Hotmail is catching this. MySite.com sent an email but through MyHost.com's mail servers.One thing I noticed (though I have Hotmail Live) is that I can add my domain name to its approved list. Once I did that emails were able to get through.Of course I could be completely wrong, but this has been my experience with my mail scripts. Quote Link to comment https://forums.phpfreaks.com/topic/21973-checking-mail-headers/#findComment-98132 Share on other sites More sharing options...
onlyican Posted September 25, 2006 Author Share Posted September 25, 2006 if I sent the mail without a FROM: headerit is from unlimitied1.dnsprotect.com(Running a Reverse IP check on my domain will show u, so theres no point hiding it)Could this be the issue thenI use POP 3 mail serversI connect to my mail server usingmail.sitename.comSo Any suggestions Quote Link to comment https://forums.phpfreaks.com/topic/21973-checking-mail-headers/#findComment-98362 Share on other sites More sharing options...
alpine Posted September 25, 2006 Share Posted September 25, 2006 I've been able to make a "complete" set of headers that works good and goes straight to inbox on hotmail (and all others i have tried).But then again, testing my "setup" from other hosts - hotmail sometimes takes it to junk... so server setup probably sets some limitations.I found that to use Outlook Express as a tool, sending messages to myself and explore the headers by properties->source i could read the x-spam status to determine a great deal and correct and improve the message headers.For example sending through smtp is a major advantage along with a valid message id.This is a header generated from one of my sites (*** out some parts though:[code]Return-Path: <system@*******.no>Received: from lakepoint.********.no (lakepoint.********.no [194.**.***.**]) by mx01.*******.no (8.13.8/8.13.8) with ESMTP id k8KG2Ej9026742 for <admin@*******.no>; Wed, 20 Sep 2006 18:02:14 +0200Received: from astoria.********.no (astoria.*********.no [194.**.***.**]) by lakepoint.********.no (8.13.8/8.13.8) with ESMTP id k8KG2EP2019986 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for <admin@******.no>; Wed, 20 Sep 2006 18:02:14 +0200Received: from ******** by astoria.*******.no with local (Exim 4.50) id 1GQ4Wc-0004WY-0u for admin@********.no; Wed, 20 Sep 2006 18:02:14 +0200To: admin@*********.noSubject: HenvendelseX-Message-Key: IA==From: RenaultBiler System <system@*******.no>Reply-To: RenaultBiler System <system@*******.no>X-Mailer: PHP v5.1.5Date: Wed, 20 Sep 2006 18:02:14 +0200Message-ID: <20060920180214R58N1BP8OZQS@www.********.no>MIME-Version: 1.0Content-Transfer-Encoding: 8bitContent-Type: multipart/related; boundary="212620dda9563902b5b1ffe2d4644dd0"X-Spam-Status: No, hits=-0.5 required=4.0X-Spam-Report: -0.5 hits, 4.0 required; * -0.5 ALL_TRUSTED Passed through trusted hosts only via SMTPX-Virus-Scanned: by moam (http://www.moam.net/)X-Moam-Version: 0.93[/code]So, either my site sends newsmail to hundreds containing html or text emails to users, they all work great. Quote Link to comment https://forums.phpfreaks.com/topic/21973-checking-mail-headers/#findComment-98400 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.