Jump to content


Photo

Checking Mail Headers


  • Please log in to reply
4 replies to this topic

#1 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 25 September 2006 - 01:22 PM

ok

I have a register form

on completion
I send a default email to them
BUT

Hotmail 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 live

I am using the following mail headers

<?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";
?>

The body of the email looks something like
<?php
echo "<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

?>


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 machine

On there, I viewed the headers, and they are

Date: Mon, 25 Sep 2006 15:15:48 +0200
Subject: Registration with My Site Network
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
To: Jamie <jamie@local.com>,
From: MySite<info@MySite.net>
Message-ID: <20060925151548084977122>


Everything looks ok to me, but I am no expert

What do u tink
Tell me the problem, I will try tell you the solution

#2 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 25 September 2006 - 01:26 PM

Try removing the To field from the headers... Hotmail doesn't like that.

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#3 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 25 September 2006 - 01:27 PM

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.

#4 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 25 September 2006 - 05:24 PM

if I sent the mail without a FROM: header
it 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 then
I use POP 3 mail servers
I connect to my mail server using
mail.sitename.com

So Any suggestions


Tell me the problem, I will try tell you the solution

#5 alpine

alpine
  • Members
  • PipPipPip
  • Advanced Member
  • 756 posts
  • LocationNorway

Posted 25 September 2006 - 06:16 PM

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:
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 +0200
Received: 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 +0200
Received: from ******** by astoria.*******.no with local (Exim 4.50)
	id 1GQ4Wc-0004WY-0u
	for admin@********.no; Wed, 20 Sep 2006 18:02:14 +0200
To: admin@*********.no
Subject: Henvendelse
X-Message-Key: IA==
From: RenaultBiler System <system@*******.no>
Reply-To: RenaultBiler System <system@*******.no>
X-Mailer: PHP v5.1.5
Date: Wed, 20 Sep 2006 18:02:14 +0200
Message-ID: <20060920180214R58N1BP8OZQS@www.********.no>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: multipart/related; boundary="212620dda9563902b5b1ffe2d4644dd0"
X-Spam-Status: No, hits=-0.5 required=4.0
X-Spam-Report: -0.5 hits, 4.0 required;
	* -0.5 ALL_TRUSTED            Passed through trusted hosts only via SMTP
X-Virus-Scanned: by moam (http://www.moam.net/)
X-Moam-Version: 0.93

So, either my site sends newsmail to hundreds containing html or text emails to users, they all work great.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users