邮件未附带冒号 [英] Mail not delivered with colon

查看:103
本文介绍了邮件未附带冒号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using System.Net.Mail;

public static void Send(NotificationMessage message)
        {
            MailMessage objMessage = new MailMessage()
            {
                From = new MailAddress(ConfigurationManager.AppSettings["Email.Sender"]),
                Subject = message.Subject,
                BodyEncoding = Encoding.UTF8,
                IsBodyHtml = true,
                Body = message.MessageBody,
            };

            foreach (var recipient in message.RecipientName)
                objMessage.To.Add(recipient);

            SmtpClient SmtpMail = new SmtpClient(ConfigurationManager.AppSettings["Email.ServerName"]);
            SmtpMail.Send(objMessage);
        }





如果正文是:

找不到此标识符的实体:201511300

邮件已发送但未送达。没有例外。



如果正文只是:

没有为此标识符找到实体201511300 - 没有冒号邮件送货正常



如果您有任何想法可能会发生这种情况请分享;)



If body is:
"No entity found for this identifier: 201511300"
mail is sent but not delivered. No exception nothing.

if body is just:
"No entity found for this identifier 201511300" -- without colon the mail is delivered fine.

if you have any thought why this might happen please share them ;)

推荐答案

基于Richard Deeming的评论:



检查收件人的邮件服务器的垃圾邮件过滤器。没有一个主要的错误,这是唯一可以根据邮件内容阻止邮件发送的东西。



我已经做到了,这是案件。所有邮件最终都在垃圾邮件文件夹中。
Based on Richard Deeming comment:

Check the recipient's mail server's spam filters. Short of a major bug, that's the only thing that's going to prevent mail being delivered based on the content of the message.

I've done that and it is the case. All mails end up in spam folder.


这篇关于邮件未附带冒号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆