阻止Gmail为网址和电子邮件地址创建链接 [英] Prevent Gmail from creating links for URLs and email addresses
本文介绍了阻止Gmail为网址和电子邮件地址创建链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SmtpClient MailClient =新的SmtpClient();
MailMessage NetMail = new MailMessage();
msg =我不希望www.google.com作为收件人端的链接。< br />;
msg + =我希望我的电子邮件地址myemail@myudomain.com成为html而无需链接;
NetworkCredential cr = new NetworkCredential(########,###########);
NetMail.From = new MailAddress(######## @ m ####。###,######);
NetMail.To.Add(新邮件地址(abc@xyz.com));
NetMail.Subject =测试邮件;
NetMail.IsBodyHtml = true;
NetMail.Body = msg;
MailClient.Host =xyz.com;
MailClient.Port = 25;
MailClient.EnableSsl = false;
MailClient.Credentials = cr;
MailClient.Send(NetMail);
任何解决方案?
解决方案 克服这个是欺骗解析器。只是把空格,Html标签,无论如何解析器不能识别像(Banging SO :)): -
http://foolishedsiteparser.com
_http: //www.parsersmashed.com
noonesemail@linkdead.com
和其他许多方式...)
<
http://foolishedsiteparser.com
_http: //www.parsersmashed.com
noonesemail@linkdead.com
和其他许多方式...)
<
http:< span> // foolishedsiteparser.com< / span> <峰; br />
_http://www.parsersmashed.com< br />
noonesemail< x> @< / x> linkdead.com< br />
]
Problem is gmail automatically create hyperlink for all website url and email address. I do not want to create a link. My
SmtpClient MailClient = new SmtpClient();
MailMessage NetMail = new MailMessage();
msg ="I do not want www.google.com as a link at recipient end. <br/>";
msg += "I want my email addrress myemail@myudomain.com as html without a link";
NetworkCredential cr = new NetworkCredential("########", "###########");
NetMail.From = new MailAddress("########@m####.###", "######");
NetMail.To.Add(new MailAddress("abc@xyz.com"));
NetMail.Subject = "Test Mail";
NetMail.IsBodyHtml = true;
NetMail.Body = msg;
MailClient.Host = "xyz.com";
MailClient.Port = 25;
MailClient.EnableSsl = false;
MailClient.Credentials = cr;
MailClient.Send(NetMail);
Any solution?
解决方案
Theres no way to stop creating URLs ,because its automatically checked by the email provider that whether the text is a valid URL.
Only way to overcome this is, deceiving the parser. just put spaces,Html tags,whatever in such a way that parser cant identify like (Banging SO :) ):-
http://foolishedsiteparser.com
_http://www.parsersmashed.com
noonesemail@linkdead.com
and many other ways... ;)
[Compiled from :-
http:<span>//foolishedsiteparser.com</span> <br/>
_http://www.parsersmashed.com <br/>
noonesemail<x>@</x>linkdead.com <br/>
]
这篇关于阻止Gmail为网址和电子邮件地址创建链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文