SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Gmail Headers - Email keeps going to spam...

    I have gotten my emails to work fine with hotmail/msn and I am now trying to get them to show up as not spam for gmail. The only emails I send are during user registration and account violations which are important that the user sees and does not over look them due to a spam folder...

    Anyway, here is what I'm using currently.

    PHP Code:
        $headers  "MIME-Version: 1.0" "\r\n";
        if(
    $html == 'true')
        {
            
    $headers .= "Content-type: text/html; charset=iso-8859-1" "\r\n";
        } else {
            
    $headers .= "Content-type: text/plain; charset=iso-8859-1" "\r\n";
        }
        
    $headers .= "From: \"$from_name\" <" $from ">" "\r\n";
        
    $headers .= "To: $to"\r\n";
        
    $headers .= "Reply-To: \"$from_name\" <" $from ">" "\r\n";
        
    $headers .= "X-Priority: 3" "\r\n";
        
    $headers .= "X-MSMail-Priority: Normal\r\n";
        
    $headers .= "X-Mailer: -Site Name Removed- PHP Mailer" "\r\n";
        
        if(!
    mail($to$subject$body$headers))
        {
            
    error_msg($lang['Error'], $lang['Unable_To_Send_Email']);
        } 

  2. #2
    SitePoint Addict aniltc's Avatar
    Join Date
    Nov 2006
    Location
    INDIA
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    hi

    I think if you give return path in the mail function,will solve your problem

    bye

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aniltc View Post
    hi

    I think if you give return path in the mail function,will solve your problem

    bye
    Is the return path not the same as a reply to?

    Either way, I added
    PHP Code:
    $headers .= "Return-Path: \"$from_name\" <" $from ">" "\r\n"
    and the mail was still sent to the spam box.


Bookmarks

Posting Permissions

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