Email Flagged as Spam


#1

Hi,

I am sending emails with the Meteor email package.

It is getting flagged as spam.

mail-tester.com gave me a few reasons for it they included:

  1. Message only has text/html MIME parts. You should also include a text version of your message (text/plain)

  2. Missing Date: header

I split my message into a text part and a html part but I’m still getting the message.

Also I’m not getting the format of the header right. Meteor Docs doesn’t show it in their example. I googled and googles but no solutions came up.

Thanks!!


#2

It’d help if you pasted the raw headers from your test messages. I believe this is what Meteor based their package off of, take a look at the docs and you may be able to find your answer. You can pass a MailComposer object directly to open up more options in the formatting and structure of your email. Not sending a text part wouldn’t automatically cause a spam flag. May want to check the server IP on mxtoolbox.com to see if it has any issues or is on a blacklist.

But again, all of this is a shot in the dark without seeing the raw headers of your test message. Good luck!


#3

Have you tried mailgun.com? One of their biggest priorities is trying to keep your mailings from ending up in the spam folder. 10,000 emails a month free and then just $0.0005 per message.


#4

Thank you for your response!

Here is the header from a test email:

Return-path: checkthisout@capatil.com
Envelope-to: mendel@sohoprospecting.com
Delivery-date: Thu, 11 Jun 2015 17:40:56 -0700
Received: from static-71-254-149-140.lsanca.fios.verizon.net ([71.254.149.140]:51404 helo=[127.0.0.1])
by host3.sohoprospecting.org with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256)
(Exim 4.85)
(envelope-from checkthisout@capatil.com)
id 1Z3D1k-0003zV-5j
for mendel@sohoprospecting.com; Thu, 11 Jun 2015 17:40:56 -0700
MIME-Version: 1.0
From: checkthisout@capatil.com
To: mendel@sohoprospecting.com
Reply-To: mendel@sohoprospecting.com
Subject: Take a look at this
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

The message I’m getting from mail tester is “Missing Date: header” and “Missing Message-Id: header”.

How can I add them without using a third party package?


#5

Do you have your reverse DNS set for the domain as well as an SPF record? I
don’t see any domain signing or anything that helps tell servers it’s a
legit message


#6

also if you can provide the snippet you’re using to call Email.send that’d help too. Sorry I couldn’t be much more help.


#7

sendEmail: function (to, from, replyTo, subject, text) {
check([to, from, replyTo, subject, text], [String]);

	// Let other method calls from the same client start running,
	// without waiting for the email sending to complete.
	this.unblock();

	Email.send({
		to: to,
		from: from,
		replyTo: replyTo,
		subject: subject,
		html: text
	});
}

According to meteor doc I should be able to add a header after the html as quoted below. My format of the header object must be wrong because when I tried it, it didn’t go through.

Thanks again!

From meteor docs:

Email.send(options)
email/email.js, line 126
Send an email. Throws an Error on failure to contact mail server or if mail server returns an error. All fields should match RFC5322 specification.

Options
from String
"From:" address (required)

to, cc, bcc, replyTo String or Array of Strings
"To:", “Cc:”, “Bcc:”, and “Reply-To:” addresses

subject String
"Subject:" line

text, html String
Mail body (in plain text and/or HTML)

headers Object
Dictionary of custom headers


#8

I’m struggling with exactly the same issue.

My server is pretty fussy about RFC compliance and headers and will not accept mail without a date header.

Regrettably though I can mangle some perl and bash, I know pretty well bugger all about JS :slight_smile:

Here’s the relevant code from email.js

Email.send = function (options) {
for (var i = 0; i < sendHooks.length; i++)
if (! sendHooksi)
return;

var mc;
if (options.mailComposer) {
mc = options.mailComposer;
} else {
mc = new MailComposer();

// setup message data
mc.setMessageOption({
  from: options.from,
  to: options.to,
  cc: options.cc,
  bcc: options.bcc,
  replyTo: options.replyTo,
  subject: options.subject,
  text: options.text,
  html: options.html
});

There should be a date field in there, and it should really be (now)

From this:

Advanced fields:
date - optional Date value, current UTC string will be used if not set

I can vaguely see that I need something like this:

var dateObj = new Date();
Date: dateObj.toUTCString()

But I don’t understand how to add it… it’s a simple, coding thing way beyond me :slight_smile:

I also wondered about adding how to add default ‘from’ address so sort of

if options.from not set
options.from = somebody@somewhere.com

Again I am sure it isn’t hard - just way beyond me !

Any help appreciated.

B. Rgds
John