Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-10-2003, 06:26 AM   PM User | #1
duniyadnd
Regular Coder

 
Join Date: Jun 2002
Location: Depends on the time of year
Posts: 478
Thanks: 0
Thanked 0 Times in 0 Posts
duniyadnd is an unknown quantity at this point
forms emailing to hotmail inbox..

Testing this code to create a simple mail script to send across to a hotmail account, however, it always sends it to my junk folder. Is there any way of guaranteeing that it will send an email to the inbox instead? I'm testing with a hotmail and yahoo account.

I'm using what someone suggested on the php.net website:

PHP Code:
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: php\n"
and it still doesn't work, goes straight to my junk mail.

Duniyadnd
duniyadnd is offline   Reply With Quote
Old 04-10-2003, 06:34 AM   PM User | #2
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,225
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Well it's not really going to be a php issue. You would have to find out why hotmail's spam filters are sending to the bulk/junk folder. There could be many reasons why it's getting flagged as spam. Maybe your host's server has been flagged by hotmail as sending spam, maybe something in your subject line is getting flagged. Do you have any of your own filters set on your hotmail account? Hotmail may not like certain headers, find out what is acceptable from them.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 04-10-2003, 12:29 PM   PM User | #3
duniyadnd
Regular Coder

 
Join Date: Jun 2002
Location: Depends on the time of year
Posts: 478
Thanks: 0
Thanked 0 Times in 0 Posts
duniyadnd is an unknown quantity at this point
This worked...

PHP Code:
$to $contactNameTwo." <".$emailTwo."> \r\n";


$headers "From: ".$contactNameOne." <".$emailOne.">\n"
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "Reply-To: ".$contactNameOne." <".$emailOne.">\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: php\n";

mail$to$subject$information$headers); 
Where $contactNameTwo = "Receiver's Name"
$emailTwo = "Receiver's Email Addr"
$contactNameOne = "Senders Name"
$emailOne = "Senders Email Addr"

Hope it helps anyone else looking for a script that works.

Duniyadnd
duniyadnd is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:35 AM.


Advertisement
Log in to turn off these ads.