【问题标题】:how to avoid getting email into spam如何避免将电子邮件变成垃圾邮件
【发布时间】:2014-12-29 09:36:51
【问题描述】:

我在 asp.net 中开发了一个 Web 应用程序,我需要在其中发送电子邮件进行通信,这几天可以正常工作。现在有一天,我所有的电子邮件都进入了垃圾邮件文件夹。

我使用以下代码发送邮件

public  void SendMailMessage(string to, string subject, string body, AlternateView Altv, string bcc="")
        {
            // Instantiate a new instance of MailMessage
            MailMessage mMailMessage = new MailMessage();

            // Set the sender address of the mail message
            mMailMessage.From = new MailAddress("FORM EMAIL");
            // Set the recepient address of the mail message

            mMailMessage.To.Add(new MailAddress(to));

            mMailMessage.Subject = subject;
            // Set the body of the mail message

            if (bcc != "")
            {
                mMailMessage.Bcc.Add(bcc);
            }

            mMailMessage.AlternateViews.Add(Altv);

            mMailMessage.Body = body;

            // Set the format of the mail message body as HTML
            mMailMessage.IsBodyHtml = true;
            // Set the priority of the mail message to normal
            mMailMessage.Priority = MailPriority.Normal;



            // Instantiate a new instance of SmtpClient
            SmtpClient mSmtpClient = new SmtpClient();

            mSmtpClient.Host = "HOST";
            // Send the mail message

            mSmtpClient.Credentials = new System.Net.NetworkCredential()
            {
                UserName = "EMAIID",
                Password = "PASSWORD"

            };
            mSmtpClient.Port = 25;
            mSmtpClient.EnableSsl = true;
            mSmtpClient.UseDefaultCredentials = true;  
            try
            {
                mSmtpClient.Send(mMailMessage);
            }
            catch
            {}

        }

我想添加签名者、回复者、取消订阅电子邮件标题,以便将电子邮件放入收件箱以及如何

【问题讨论】:

  • 我与一家代表其他公司发送营销活动的公司签订了合同,我知道您的问题的答案非常复杂。您的代码没有明显的问题,它更有可能与您发送的内容、发送的位置以及您的域/IP 的配置方式有关。你能告诉我们使用的发件人地址吗?送来的尸体样本怎么样?您是否检查过您的邮件列表中的奇怪地址,例如以@spamhaus.org 结尾的地址?您每分钟发送多少封电子邮件?电子邮件交易是相关的还是营销的?

标签: asp.net email webmail


【解决方案1】:

添加到您的代码中:

        mMailMessage.BodyEncoding = System.Text.Encoding.GetEncoding("utf-8");

请参考:Avoiding Spam

【讨论】:

    猜你喜欢
    • 2012-01-16
    • 1970-01-01
    • 2012-06-28
    • 2013-07-03
    • 2014-06-06
    • 1970-01-01
    • 2011-07-12
    • 1970-01-01
    • 2012-12-25
    相关资源
    最近更新 更多