Html Messages Go To Spam - Problem With Replacing Them With A Text

Hi guys,

Due to huge problems with CS Cart notifications being qualified as a spam at almost all receivers' inboxes, we needed to investigate possible causes of this. After checking thoroughly DNS settings and confirming they were all correct, we found out that mail providers treat our CS Cart messages as SPAM, because they are all only HTML. And, i.e. a company status change notification looks like this:

{{ snippet("header") }}

{{ __("hello") }},


{% if (status_from == "A" and status_to == "D") or (status_from == "D" and status_to == "A") or (status_from == "P" and status_to == "D") or (status_from == "D" and status_to == "P") %}
{{ __("text_company_status_changed", {"[company]": company.company_name, "[status]": status}) }}
{% elseif status_from == "A" and status_to == "P" %}
{{ __("text_company_status_active_to_pending", {"[company]": company.company_name}) }}
{% elseif status_from == "N" and status_to == "A" %}
{{ __("text_company_status_new_to_active", {"[company]": company.company_name}) }}
{% elseif status_from == "N" and status_to == "D" %}
{{ __("text_company_status_new_to_disable", {"[company]": company.company_name}) }}
{% elseif status_from == "N" and status_to == "P" %}
{{ __("text_company_status_new_to_pending", {"[company]": company.company_name}) }}
{% elseif status_from == "P" and status_to == "A" %}
{{ __("text_company_status_pending_to_active", {"[company]": company.company_name}) }}
{% endif %}


{% if reason %}
{{ __("reason") }}: {{ reason }}


{% endif %}

{% if e_account == 'updated' %}
{{ __("text_company_status_new_to_active_administrator_updated", {"[link]": vendor_url, "[link_text]": vendor_url|puny_decode, "[login]": e_username}) }}
{% elseif e_account == 'new' %}
{{ __("text_company_status_new_to_active_administrator_created", {"[link]": vendor_url, "[link_text]": vendor_url|puny_decode, "[login]": e_username, "[password]": e_password}) }}
{% endif %}

{{ snippet("footer") }}



which is absolutely unacceptable to for example Gmail account and automatically goes to SPAM.

We needed to change this, so we went to Notifications --> Vendor notifications --> Vendors, and just wanted to replace the html above with our plain text, so for examplea status "Vendor status changed to Active" would get a plain text: "Hello, Your company was activated, blablabla", and so on, different texts for different statuses. It worked great for the SPAM - it completely solved the problem and messages started to arrive in a correct inbox. However, we noticed, that when we change our text for example in "Vendor status changed to Active", the same text shows up also in other statuses... So now, no matter if I block, activate or set the company status as "pending" - the receiver always gets the message "Hello, Your company was activated". This is something unacceptable - if we have different fields to put a text, why putting it in one field, determinates other fields as well? The text should be sticked to only one status.
I consider it a CS Cart's bug, or at least something extremely counter-intuitive, but maybe any of you faced this problem already and knows how to handle this, to set a different text in different company statuses?
Thank you,
Paulina

99% you haven’t set correctly the SPF and DKIM in your server. The reason your plain text emails are delivered is because plain text is just plain text 😀 go to this website and send an email to the address it mention and then you can check the results: https://www.mail-tester.com

99% you haven’t set correctly the SPF and DKIM in your server. The reason your plain text emails are delivered is because plain text is just plain text go to this website and send an email to the address it mention and then you can check the results: https://www.mail-tester.com

We did :( We run the test and got score 8.4/10. The only major problem indicated by the mail-tester was HTML (exact comment: -1.105 MIME_HTML_ONLY Message only has text/html MIME parts --> I forgot to mention this in my first post).

What I can assure you is that if you use cs-cart default email notifications with default send by php and correct server email settings then it shouldn’t go to spam.

What I can assure you is that if you use cs-cart default email notifications with default send by php and correct server email settings then it shouldn’t go to spam.

We send it by smtp, it was recommended to us due to some other settings.

However, please note that my problem is mainly the impossibility of setting correct text in Company status notifications (the second part of my post).

We send it by smtp, it was recommended to us due to some other settings.

@sioulisn, one more thing, we have just tried to send email by php - and indeed, it didn't go to spam. But the message arrived with a red flag, as an unencrypted one. Seems like we have to change to smtp (we have Google mailbox connected to our CS Cart).

However, please note that my problem is mainly the impossibility of setting correct text in Company status notifications (the second part of my post).

So please post here current content of notification. Have you removed the Twig conditions by status in template?

Unencrypted means that didn’t sent through a subdomain with SSL probably or it didn’t used the SSL port. Is the reason that your smtp also marks it as spam could be that it uses the nonencrypted port instead of 465 (the connection between you and smtp service) ? I think, Php has nothing to do with the “spamminess”, the php is part on your server and it makes a final message with headers, that this message is forwarding to the recipient. Things you have to check is email domain if have SSL, SPF and DKIM configured correctly. Because these things are server related things that have to be correct configured, you should better ask help from a professional, especially if you don’t use any good managed server administration panel. I want to mention that I am not professional but just many years of experience with servers and I am just telling you where to look so you can find the issue.

Unencrypted means that didn’t sent through a subdomain with SSL probably or it didn’t used the SSL port. Is the reason that your smtp also marks it as spam could be that it uses the nonencrypted port instead of 465 (the connection between you and smtp service) ? I think, Php has nothing to do with the “spamminess”, the php is part on your server and it makes a final message with headers, that this message is forwarding to the recipient. Things you have to check is email domain if have SSL, SPF and DKIM configured correctly. Because these things are server related things that have to be correct configured, you should better ask help from a professional, especially if you don’t use any good managed server administration panel. I want to mention that I am not professional but just many years of experience with servers and I am just telling you where to look so you can find the issue.

@sioulisn, thanks a lot for your explanation. We are checking it once again, more thorougly. Possibly there are yet fields for improvement. I will update this topic when we know something.

Unencrypted means that didn’t sent through a subdomain with SSL probably or it didn’t used the SSL port. Is the reason that your smtp also marks it as spam could be that it uses the nonencrypted port instead of 465 (the connection between you and smtp service) ? I think, Php has nothing to do with the “spamminess”, the php is part on your server and it makes a final message with headers, that this message is forwarding to the recipient. Things you have to check is email domain if have SSL, SPF and DKIM configured correctly. Because these things are server related things that have to be correct configured, you should better ask help from a professional, especially if you don’t use any good managed server administration panel. I want to mention that I am not professional but just many years of experience with servers and I am just telling you where to look so you can find the issue.

@sioulisn, we checked and you were right - we had some problem with DKIM record. We have changed it and simultaneously also changed SMTP host and now messages don't go to SPAM. Not sure which of those 2 actions actually helped (maybe both), but you were definitely right that the problem lies in settings, not HTML. Thanks a lot for this! :)

So please post here current content of notification. Have you removed the Twig conditions by status in template?

Update: we were wrong, the problem didn't lie in HTML (as I wrote above). So in fact we can leave current settings for templates. Thank you!

DKIM is the encrypted key that confirms the message left from you and went straight to recipient. If it is missing or it is wrong the recipient’s mail service thinks that there was a middle-man attack, for example someone got your email and changed the html links…
glad to hear you have fixed it