PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
PEAR Mail - Email going in to Hotmail Junk Folder

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> PEAR
View previous topic :: View next topic  
Author Message
aleverett



Joined: 16 Jun 2011
Posts: 1

PostPosted: Thu Jun 16, 2011 11:49 pm    Post subject: PEAR Mail - Email going in to Hotmail Junk Folder Reply with quote

Hi all,

I am using PEAR's mail class to submit mail via php, as far as I can see everything is correct but emails are still going in to the Junk Mail in Hotmail. Yet, when I send an email from the same email address it doesn't.

Does any one know a way round this? Please see code below


require_once "Mail.php";

$from_name = "My Name";
$to_name = "aleverett";
$subject = "Nice Shirt";
$mailmsg ="This is a message.";


$From = $from_name." <[email protected]>";
$To = $to_name." <[email protected]>";

$recipients = "[email protected]";
$headers["From"] = $From;
$headers["To"] = $To;
$headers["Subject"] = $subject;
$headers["Reply-To"] = "[email protected]";
$headers["Content-Type"] = "text/html; charset=ISO-8859-1";
$headers["Return-path"] = "[email protected]";

$smtpinfo["host"] = "mail.mydomain.co.uk";
$smtpinfo["port"] = "26";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "support+mydomain.co.uk";
$smtpinfo["password"] = "password";

$mail_object =& Mail::factory("smtp", $smtpinfo);

$mail_object->send($recipients, $headers, $mailmsg);

Thanks, Alex
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> PEAR All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement