我正在尝试以HTML格式发送此消息
您好Ryan Fishman,
请点击https://www.asportsmanager.com/#ConfirmRegistration?username=batmanbond3dd®istrationtoken=3Dc95e54e4-b099-4338-ad34-fd418e9b4ca1">here to注册asportsmanager.com。
使用此vb.net代码
Dim mm As New MailMessage
mm.From = New MailAddress(ConfigObject.SendEmailSender)
mm.To.Add(New MailAddress(ToAddress))
mm.Subject = Subject
mm.IsBodyHtml = IsBodyHTML
mm.Body = Nothing
Dim ABody As AlternateView = Net.Mail.AlternateView.CreateAlternateViewFromString(Body)
ABody.TransferEncoding = Mime.TransferEncoding.SevenBit
ABody.ContentType = New Mime.ContentType("text/html; charset=""utf-8""")
mm.AlternateViews.Add(ABody)
Dim smtpclient As New SmtpClient(ConfigObject.SendEmailServer)
smtpclient.UseDefaultCredentials = False
smtpclient.Credentials = New System.Net.NetworkCredential(ConfigObject.SendEmailUsername, ConfigObject.SendEmailPassword)
smtpclient.Send(mm)
当我将此电子邮件发送到Gmail帐户时,邮件显示正常。出于某种原因,当它被发送到hotmail(outlook)电子邮件时,链接显示为
注意%c2%ae应为& reg。
请帮忙。
答案 0 :(得分:0)
似乎由于某种原因,前景与%c2%ae一起逃脱& reg。对我来说这是一个很好的解决方法,就是用& token来改变和注册。