Results 1 to 2 of 2

Thread: Mail Subject cause SPAM

  1. #1
    Join Date
    Jul 2010
    Thanked 0 Times in 0 Posts

    Default Mail Subject cause SPAM

    I have code for mail subject:

    PHP Code:
    $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 Code:
     $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.
    Last edited by rhodarose; 05-17-2011 at 10:34 AM.

  2. #2
    Join Date
    Apr 2008
    Thanked 516 Times in 502 Posts
    Blog Entries


    are you sure it's being filtered as spam, and not failing for some other reason? for example, what does your variable csvUploadPaymentDetails[0]['csvfilename'] contain? RFC2822 limits the number of characters you can put in an email header (e.g., Subject line) to 998 (and only 78 per line). You might find this useful.

    If your email is being ID'd as spam, then you need to change the content of your Subject line. it looks like you're putting a filename in your subject now; that seems like it might be suspicious in the eyes of a spam filter. In any case, there are no hard rules about avoiding spam: email clients all do this differently, and are constantly updating their criteria.

  3. The Following User Says Thank You to traq For This Useful Post:

    rhodarose (05-19-2011)


Posting Permissions

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