在 C# 中将 HTML 电子邮件签名附加到纯文本电子邮件正文

发布于 2024-11-27 07:58:05 字数 306 浏览 4 评论 0原文

我编写了一个程序来向我们的一些客户发送提醒电子邮件,并且它有效。现在我们正在尝试将电子邮件签名添加到我们的电子邮件中,这是一个 html 文件。我们在 Thunderbird 中使用相同的文件。我尝试将 HTML 内容添加到正文中,并且它有效。唯一的问题是“\n”不再作为换行符工作,因为 smtpClient.IsBodyHtml = true !尝试用
替换“\n”不起作用,但在我的 html 签名正文中包含实际消息效果很好,除非邮件服务器将它们检测为垃圾邮件!有什么解决办法吗? 我的实际电子邮件是纯文本,我只想在末尾添加链接到我们网站的我们公司的徽标。

I wrote a program to send reminder emails to some of our customers, and it works. Now we are trying to add our email signature to our emails which is an html file. We are using the same file in Thunderbird. I tried adding the HTML content to the body and it works. The only problem is "\n" doesn't work as newline anymore, since smtpClient.IsBodyHtml = true ! tried replacing "\n" with <br /> didn't work, but including the actual message inside the body of my html signature works fine, except mail servers detect them as spam mails ! is there any solution to this ?
My actual email is a plain text I just want to add the logo of our company linked to our website to the end.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月棠 2024-12-04 07:58:05

我对您表示同情,因为您只想要一封纯文本电子邮件,但如果您的客户确实想要这些电子邮件并且您确实想要您的徽标,那么他们可以将您的域列入白名单,以便所有电子邮件都能通过!

我们使用一家名为 mailchimp 的公司来发送订户邮件,我向他们询问如何避免垃圾邮件过滤器,尤其是在向一大群人发送广告的情况下,很难避免它们,这是他们的建议,并且有很多。

避免垃圾邮件过滤器

I sympathise with you as you only want a plain text email but if your clients really want those emails and you really want your logo in then they could just white list your domain so that all emails get through!

We use a company called mailchimp for sending out subscriber mails and I questioned them on how to avoid spam filters especially in the context of essentially an advert out to a large group it can be very difficult to avoid them, here is their advice and there is lots of it.;

Avoiding the Spam Filters

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文