简体   繁体   English

将电子邮件限制为不在垃圾文件夹中发送,并且可以将电子邮件隐藏为收件人吗?

[英]Restricting Email to not sent in Junk Folder and can it possible from Email hide to recipient?

I am sending email throught SMTP Client using below code. 我正在使用以下代码通过SMTP客户端发送电子邮件。

MailMessage objMail = new MailMessage("FromEmail", "ToEmail", "Subject", "Email Body");
SmtpClient SmtpClnt = new SmtpClient();
SmtpClnt.Send(objMail);

I have two question here 我在这里有两个问题

  1. How can I ensure that email is not sent junk email folder? 如何确保电子邮件不会发送到垃圾电子邮件文件夹?
  2. Can I hide from email to recipient and just show some textual name? 我可以从电子邮件隐藏到收件人,仅显示一些文本名称吗?

Thanks 谢谢

You can't do #1. 你不能做#1。 The choice of whether a piece of email is marked as junk is up to the user. 是否将一封电子邮件标记为垃圾邮件取决于用户。 For example, they may create a rule that all mail from you (or with your name in it) is sent to their Junk mail folder (or deleted!). 例如,他们可以创建一条规则,将来自您(或其中带有您的名字)的所有邮件发送到其“垃圾邮件”文件夹(或删除!)。 The best way to get folks to read your emails and not have automated systems treat it as spam is to send content that people want to read. 使人们阅读您的电子邮件而没有自动系统将其视为垃圾邮件的最佳方法是发送人们想要阅读的内容。

  1. You can't ensure it doesn't go into the junk folder. 您不能确保它不会进入垃圾文件夹。 Different ISPs and mail clients have their own proprietary algorithms for classifying mail as junk. 不同的ISP和邮件客户端具有自己的专有算法,可将邮件分类为垃圾邮件。 There's no way to guarantee delivery. 没有办法保证交货。 If you set up a feedback loop with the ISP and/or get on a whitelist, that will help. 如果您与ISP建立了反馈循环和/或进入白名单,这将有所帮助。 SPF and DKIM also help. SPF和DKIM也有帮助。 But there's no guarantee. 但是没有保证。 A service such as Return Path can test whether your emails end up in the inbox or the junk folder, but these services are expensive. 诸如“返回路径”之类的服务可以测试您的电子邮件是放在收件箱还是垃圾文件夹中,但是这些服务非常昂贵。 Your best option is to just send some test emails and see where they end up. 最好的选择是只发送一些测试电子邮件,然后查看最终结果。 Your IP address's reputation has a big impact... you want to make sure there is no spammy email coming from the same IP. 您的IP地址的声誉会产生很大的影响...您想确保没有来自同一IP的垃圾邮件。

  2. No, you can't hide the from address. 不,您无法隐藏发件人地址。 It is a standard part of the email message, and there's no way to tell email clients not to display it. 它是电子邮件的标准部分,无法告诉电子邮件客户不要显示它。 If you want, you can make up a fake "from" address such as noreply@yourdomain.com. 如果需要,您可以伪造一个“发件人”地址,例如noreply@yourdomain.com。 It doesn't have to be a real address if you don't need to receive replies to the email. 如果您不需要接收对电子邮件的答复,则不必是真实地址。

As Eric mentioned, it would be good to know why you want to do this... I hope you aren't trying to send spam. 正如埃里克(Eric)所述,很高兴知道您为什么要这样做...我希望您不要试图发送垃圾邮件。 If you're sending large mailings to people who have opted in, you may want to use a third-party service rather than writing your own code. 如果您要向选择加入的人发送大型邮件,则可能需要使用第三方服务,而不是编写自己的代码。 Handling unsubscribes and bounces is a big task. 处理退订和退回是一项艰巨的任务。

As popester mentioned, the most important thing is to send relevant content to people who want to receive it... 正如popester提到的,最重要的是将相关内容发送给想要接收的人...

As others have already said, 2. is not an option and makes one wonder what you're up to! 正如其他人已经说过的那样,2.不是一种选择,这使您感到纳闷!

Based on my experience the best results in avoiding emails being classified as spam come from sending the email through an SMTP server that requires authentication. 根据我的经验,避免将电子邮件分类为垃圾邮件的最佳结果来自通过需要身份验证的SMTP服务器发送电子邮件。

I was building an automated reply to a registration at a site, and Gmail, Yahoo etc were fine with the mails. 我正在建立一个对站点注册的自动回复,而Gmail,Yahoo等可以很好地处理邮件。 However, they were always classified as spam by Hotmail. 但是,它们始终被Hotmail归类为垃圾邮件。 I played with the headers, from-address, reply-to address etc, but nothing helped, until I moved from PHP's own mail() function to an SMTP library and sent the mails via our domain registrar's SMTP server using valid credentials. 我使用标题,发件人地址,回复地址等,但是没有任何帮助,直到我从PHP自己的mail()函数移至SMTP库,并使用有效凭据通过我们的域名注册商的SMTP服务器发送了邮件。 Since then, no problems what so ever. 从那以后,没有任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM