HTML mail() issue

Discussion in 'PHP' started by imchandan, Feb 25, 2008.

  1. #1
    i have one issue sending HTML mails using my PHP code.
    html mail works fine until i use any link in the HTML page, ex <a href="something.com">click here</a>...
    when i use link in HTML body, it goes to Bulk folder...
    any idea ?
     
    imchandan, Feb 25, 2008 IP
  2. Dwaighty

    Dwaighty Peon

    Messages:
    358
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This doesn't have to do with php, but with your email client. Your email client filters the emails he receives and maybe the ones that have links in them are considered as spam and sent to the Bulk folder.
     
    Dwaighty, Feb 26, 2008 IP
  3. imchandan

    imchandan Guest

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    hey Dwaighty,
    well this is not the case, that;s what i m wondering ... whever i get any html mail except sent by my php script, everything work well. if u want i can write down my php mail script...
     
    imchandan, Feb 26, 2008 IP
  4. Dwaighty

    Dwaighty Peon

    Messages:
    358
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try to add a 'from' header in case you didn't.
    ex: mail($email, $subject, $message, "From: ");
     
    Dwaighty, Feb 26, 2008 IP
  5. bpasc95

    bpasc95 Active Member

    Messages:
    196
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    70
    #5
    The href parameter has to be an explicit URL. For example:
    <a href="something.com">click here</a> - is incorrect
    <a href="http://www.bla.com/something.com">click here</a> - is correct

    I have seen some filters see this as an attempt to execute something on the local machine, thus, moving it to bulk/spam.

    -Bing
     
    bpasc95, Feb 26, 2008 IP