Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •