Mail Subject become SPAM

Discussion in 'PHP' started by newphpcoder, May 17, 2011.

  1. newphpcoder

    newphpcoder New Member

    Joined:
    Sep 24, 2010
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Web Programmer
    Location:
    Philippines
    I have code for mail subject:

    PHP:
    $Mail->Subject 'Preview/' $this->csvUploadPaymentDetails[0]['csvfilename'].'/'.date('d-m-Y').'/'.$this->csvUploadPaymentDetails[0]['week_num']; 
    The problem is the mail was become SPAM, I got this message
    Mail delivery failed: returning message to sender. How can I prevent my email become not SPAM?

    When my subject is only this: $Mail->Subject = 'Preview'; it works, but I need my subject is
    PHP:
     $Mail->Subject 'Preview/' $this->csvUploadPaymentDetails[0]['csvfilename'].'/'.date('d-m-Y').'/'.$this->csvUploadPaymentDetails[0]['week_num'];
    , because I need to have filename,date, and weekno in my subject.

    It's my first time to encounter this error.

    Thank you..any help is highly appreciated.
     
  2. pein87

    pein87 Active Member

    Joined:
    Aug 6, 2010
    Messages:
    173
    Likes Received:
    47
    Trophy Points:
    28
    Occupation:
    Web Dev
    Location:
    Limbo
    The title is parsed for certain flags that tell the parser to stop sending it. Your including a filename, and date in the title which red flags due to the filename being included. Make the titles descriptive like "Your invoice from <blank>" then use the mail content to add the file as an attachment.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice