Email Delivery Puzzler

We use email to send alerts to users when various things happen, and it has been working successfully for years.
In the past three weeks, some, but not all email alerts, have stopped getting delivered.
The SMTP log file generated in our IIS(6.0) SMTP relay always show a successful handoff to the remote mailserver run by our ISP, Network Solutions.
Always delivered:
-email sent from any Print Report screen as attachment
-email sent from BPM with Send Email Widget (async)
-email sent from Power Shell with Send-MailMessage
Usually delivered:
-email sent from SQL Server with Exec msdb.dbo.sp_send_dbmail
Never delivered in past 3 weeks:
-email sent with this custom code in a BPM:

    var mailer = this.GetMailer(async: true);
    var message = new Ice.Mail.SmtpMail();
    message.IsBodyHtml = true;

I know the problem is that the ISP determines the email is SPAM so blocks it. I have had endless conversations with Network Solutions to resolve this issue, but they don’t seem to want to tell me what criteria gets these messages blocked.

I have tweaked our DNS records to make give test emails a 10/10 score. I have simplified and swapped the text of the messages so that there is no difference between the successful emails and the blocked emails other than the method of sending within Epicor.

Can anyone tell me if there is something about that custom code that could be making an ISP think those emails are suspect?

(edited code snippet to include the top line as suggested by Haso. It was there in original post but the formatting swallowed it.)

You should make your BPM Email async as well, perhaps.

  var mailer = this.GetMailer(async:true);
  var message = new Ice.Mail.SmtpMail();
  message.SetFrom( GetCompanyAddressAction(ttJobHead_Row.Company) );
  message.IsBodyHtml = true;

What kind of email service are they providing? Some custom IMAP/SMTP thing? On Office 365 we set incoming local email spam certainty to -1 so it always goes through. If Network Solutions cannot do this (is a custom IMAP/SMTP) and is unwilling to help you are effectively screwed. Their email system is a black box for you. Email goes in one side and out the other with you not able to touch it in that trip. If this is true for their email solution then truly your only solution is jumping ship. It sounds to me like you have done everything you can. They clearly do not value your business. When we dealt with Network Solutions they REALLY did not care what we needed/wanted.

Specifically to what makes the difference between why some work and some don’t, there are a few things. There is likely some piece of language that is tripping their spam filter. You have your local WAN IP in your SPF record I presume, possibly DKIM signing with the local relay, also sending as an account that is valid on Network Solutions system. Their spam filter might be doing some validity check. Also be sure to be setting a REPLY-TO address.

Truly if NS wont help you, you are basically screwed if its a black box system from the customer side. Guess and test is all you’ve got going for you.

1 Like

One thing to note also is that async is executed by the Task Agent, your task agent may run on a different IIS Server, async tells the Task Agent (APP2 example) to send the email.

Where when you dont use async you are telling APP1 (Main App Server) to send the email, which may not have the right configuration, firewall ports open what not.

We had a case where GoDaddy blocked NS, the only way one could ever find out is to run something on the same ip address where NS is sending emails out-from (telnet for example).

Otherwise you may never know if their internal ip is blocked.