Sending mail from office365 account C# mail headers

时间:2016-04-25 09:30:46

标签: c# email office365 spf dkim

I can send mail with a valid Office365 account using my C# web application to a list of opt-in addresses. So it is our own data source with our customers in it. The problem is that it is probably not received by our customers. I have send a mail from the info account to my own office365 account and pasted the headers in mxtoolbox and got a message that my local pc is blacklisted. even when it is using the smtp of office365. We have dkim enabled and spf in the dns. What else should I do to troubleshoot this?

Here is my simple C# code for sending the mail (which works, but might needs additional anti-spam stuff?)

SmtpClient sc = new SmtpClient();
sc.Host = "smtp.office365.com";
sc.Credentials = new System.Net.NetworkCredential(SmtpUsername, SmtpPassword);
sc.Port = 587;
sc.EnableSsl = true;

Should I add my home IP and from the office to the SPF dns entry, even when I am using the smtp of office365?

this is the value for Authentication-Results

dkim=none (message not signed) header.d=none;ouroffice365domain.com; dmarc=none action=none

Is that the cause for getting on the blacklist? Please note that I am not trying to send spam. It is a valid data source where people opted in for. We are just migrated to office365 and need to send a mailing to our customers from our custom web application. We are aware of the limitations (10k per day) and 1 mail every 2 sec.

edit will change this: https://stackoverflow.com/a/23409351/169714 because I just used the mail address and not the first and last name of the customer.

1 个答案:

答案 0 :(得分:0)

没有DKIM设置不会让你变黑,设置不当可以。你的家用电脑应该与SPF无关,这是持久的发送IP应该是OFFICE 365 IP。您是否通过向mailtest@unlocktheinbox.comcheck-auth@verifier.port25.com发送电子邮件来验证您的DKIM和SPF?

我也不认为您的LOCAL PC被列入黑名单,这是您列入黑名单的INTERNET提供商的IP。除非你有静态IP,否则它会改变。