Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP mail command + emailing hotmail issue

Status
Not open for further replies.

JimFL

Programmer
Jun 17, 2005
131
0
0
GB
Hi,

I am getting nowhere quickly with a php mail issue.

I have set up a script on my server to run a basic mail command on a unix server.

The code is below but as you can see it should email.

<?php
$to = //my email address
$from = //my domain in question
$message ="This is a test";

$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";


$headers .= "To: ".$to." \n";
$headers .= "From: ".$from." \n";
$subject = "TEST EMAIL from IP ADDRESS HERE";

mail($to, $subject, $message, $headers);
?>

The script works fine if I email to my work address but not to my hotmail address. However if I run the same code from another host company it works fine!!

I have spoken to the host company and they have confirmed that the email has left the server and reaches the recipient IP address. Apparently the mail is recieved without a problem (code:250) and is queued for delivery.

However I never recieved the test email/s and have spoken to hotmail directly to ask them what is happening. The first line of help has said that I should add the testing from address to my contacts which I have done (which didnt help the situation).

I have asked them to set up SENDER IP and apparently reverse DNS is set up as well but again it hasnt resolved the issue.

I have also changed the code so that the \r where removed from the headers - ie only used on Windows servers.

Has anybody else had any similar issues or can anybody help to resolve this?

JimFL

 
i'd guess your IP address range (or that of your host) has been blocked by MS.

try using phpmailer and configure the smtp class within the package to point at a trusted email relayer for your domain.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top