简体   繁体   English

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

[英]Attaching HTML email signature to plain text email body in C#

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. 现在,我们尝试将电子邮件签名添加到html文件中的电子邮件中。 We are using the same file in Thunderbird. 我们在Thunderbird中使用相同的文件。 I tried adding the HTML content to the body and it works. 我尝试将HTML内容添加到正文中,并且可以正常工作。 The only problem is "\\n" doesn't work as newline anymore, since smtpClient.IsBodyHtml = true ! 唯一的问题是“ \\ n”不再用作换行符,因为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 ! 尝试用<br />替换“ \\ n”无效,但是将实际消息包括在我的html签名正文中可以正常工作,除非邮件服务器将其检测为垃圾邮件! 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. 我的实际电子邮件是纯文本,我只想将链接到我们网站的公司徽标添加到末尾。

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.; 我们使用一家名为mailchimp的公司来发送订户邮件,我向他们询问如何避免垃圾邮件过滤器,尤其是在本质上是将广告大量传播出去的情况下,很难避免它们,这是他们的建议,很多。

Avoiding the Spam Filters 避免垃圾邮件过滤器

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

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