Jump to content

mail subject cause spam


newphpcoder

Recommended Posts

I have code for mail subject:

$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 messageMail 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

 $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.

Link to comment
Share on other sites

that is not a spam. probably your subject holds something which should not be there. so that mail is bouncing back.what is in $this->csvUploadPaymentDetails[0]['csvfilename'] and $this->csvUploadPaymentDetails[0]['week_num'] ? what does it print out?

Link to comment
Share on other sites

Spam filters check for things like too much punctuation or numbers or various other rules. If it is a requirement that the subject be that way, then you'll need to just the spam filter on the receiving server, or add the sending address to a whitelist.If the message looks like spam to the filter, then your two options are two change the message, or change the filter. If you can't change the message, then you have to change the filter.

Link to comment
Share on other sites

Spam filters check for things like too much punctuation or numbers or various other rules. If it is a requirement that the subject be that way, then you'll need to just the spam filter on the receiving server, or add the sending address to a whitelist.If the message looks like spam to the filter, then your two options are two change the message, or change the filter. If you can't change the message, then you have to change the filter.
How can i change the filter?
Link to comment
Share on other sites

that is not a spam. probably your subject holds something which should not be there. so that mail is bouncing back.what is in $this->csvUploadPaymentDetails[0]['csvfilename'] and $this->csvUploadPaymentDetails[0]['week_num'] ? what does it print out?
It print out filename and week number
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...