Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Help! Magento email arriving as spam! 
 
awillshire
Jr. Member
 
Total Posts:  10
Joined:  2008-07-21
 

Hello,

I am noticing that some (but not all) of my order related Magento emails are being flagged as spam in the subject line, when they arrive at the recipient’s inbox.  The strange thing is, the same type of email (ie: invoice) may or may not be flagged as spam, based on no related rules that I can see.  Sometimes it’s spam, sometimes it’s not.  These are all test orders, and the customer has the same name at all times. 

Has anybody experienced this & worked out a solution?

Thanks,
Andrew.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ldjones
Jr. Member
 
Total Posts:  16
Joined:  2008-04-03
 

I am having the same problem with my transactional emails.  Here is a portion of the email header regarding the spam status:

X-Spam-Level: ******
X-Spam-Status: Yes, score=6.8 required=5.0 tests=HTML_IMAGE_ONLY_20,
HTML_MESSAGE,MIME_HTML_ONLY,MIME_QP_LONG_LINE,MSGID_FROM_MTA_HEADER
autolearn=no version=3.2.3
X-Spam-Report:
* 1.8 HTML_IMAGE_ONLY_20 BODY: HTML: images with 1600-2000 bytes of words
* 0.0 HTML_MESSAGE BODY: HTML included in message
* 1.7 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
* 1.8 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars
* 1.5 MSGID_FROM_MTA_HEADER Message-Id was added by a relay

Does anyone know about “MIME_QP_LONG_LINE”?  None of my lines that I can see are longer than 76 characters.

Also, does anyone know about “MSGID_FROM_MTA_HEADER”?  Is Magento supposed to put this in when it creates the actual email that is sent?

And one more...how do I create a transactional email that has both html and plain text?

Thanks, Larry

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roland Quast
Jr. Member
 
Total Posts:  18
Joined:  2008-08-27
 

Possible causes:

1. Do you have an SPF record for the domain name of your return email address? The SPF record needs to include the internet address that magento is running on. For more info on configuring SPF records, go to http://www.openspf.org/

2. Remove all images from the emails that are sent out (sometimes embedded images particularly raise the spam meter).

3. Make sure the sending IP address of the mails (most probably your magento server’s ip address) isn’t on a spam blacklist.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ldjones
Jr. Member
 
Total Posts:  16
Joined:  2008-04-03
 

Thanks for the reply.

1. I do have a valid SPF record--double checked at http://www.openspf.org/.
2. I did remove all of my images and got the score down to 4.9.  Although, I would like to be lower than that to ensure that I get through all email servers.
3. My domain is not an any blacklist.

Still some questions:
1. How or where does the MSGID_FROM_MTA_HEADER in the email header get set?
2. How do I get Magento to have both an HTML and text message in the same email?

Thanks, Larry

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roland Quast
Jr. Member
 
Total Posts:  18
Joined:  2008-08-27
 
ldjones - 29 August 2008 09:48 PM

Thanks for the reply.

1. I do have a valid SPF record--double checked at http://www.openspf.org/.
2. I did remove all of my images and got the score down to 4.9.  Although, I would like to be lower than that to ensure that I get through all email servers.
3. My domain is not an any blacklist.

Still some questions:
1. How or where does the MSGID_FROM_MTA_HEADER in the email header get set?
2. How do I get Magento to have both an HTML and text message in the same email?

Thanks, Larry

The MSGID is set by your SMTP server. This could be sendmail or exim or whatever your default outgoing mail server is set to on your machine. You may be able to tweak the msgid by modifying the configuration files of your MTA (sendmail or whatever you are running on your magento box).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roland Quast
Jr. Member
 
Total Posts:  18
Joined:  2008-08-27
 
ldjones - 29 August 2008 09:48 PM

Thanks for the reply.

Still some questions:
1. How or where does the MSGID_FROM_MTA_HEADER in the email header get set?
2. How do I get Magento to have both an HTML and text message in the same email?

Thanks, Larry

Oh, the HTML and text message… I don’t know… since the email templates are stored as HTML files, it may just automatically set the mime type as HTML. I think your best bet is to go through the code and find out where the files are that include those html email templates. Then trace your way back until you find the email object and what methods it calls (eg, if it sets mime headers to something other than Content-type: text/plain) and modify it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
awillshire
Jr. Member
 
Total Posts:  10
Joined:  2008-07-21
 

Hi Roland,

Thank you very much for your help with this, much appreciated!

All the best,
Andrew.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ldjones
Jr. Member
 
Total Posts:  16
Joined:  2008-04-03
 

Finally, I got an answer from my web hosting support (after prematurely closing the first ticket, then forgetting to put the second ticket into the escalation queue).

They came back and said that the MSGID is set from the mail client--not the server.

So, does anyone know how this is to be set from Magento?

Thanks, Larry

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roland Quast
Jr. Member
 
Total Posts:  18
Joined:  2008-08-27
 

You can either specify the Message-Id by modifying the php mail function’s headers http://au2.php.net/manual/en/function.mail.php which I grepped the magento code and I don’t think it does it.

If the Message-Id isnt set by php, sometimes (not always) its set by the MTA. You can modify the default message ID for sendmail for instance by modifying your php.ini file http://www.linuxquestions.org/questions/linux-server-73/problem-with-the-message-id-of-outgoing-emails-missing-domain-658452/

ldjones - 10 September 2008 05:02 AM

Finally, I got an answer from my web hosting support (after prematurely closing the first ticket, then forgetting to put the second ticket into the escalation queue).

They came back and said that the MSGID is set from the mail client--not the server.

So, does anyone know how this is to be set from Magento?

Thanks, Larry

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
52249 users|848 users currently online|105519 forum posts