本文介绍了如何知道我的电子邮件是否读过的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个代码:(
I have this code :(
Dim messageId = Guid.NewGuid()
MsgBox(messageId.ToString)
Dim deliveryProcessor = "http://localhost:3738/SendEMailx/SendEMailx/email-delivery.aspx"
Dim imgTag = String.Format("<img src=""http://www.earabdirectory.com/Uploads/Classifieds/162/162Big.jpg"" alt=""xxxx"" />", deliveryProcessor, messageId)
Dim mail As New System.Net.Mail.MailMessage()
mail.To.Add(txtEmailReceiver.Text)
mail.From = New MailAddress(txtSenderEmail.Text, "Murad Hamdan", System.Text.Encoding.UTF8)
mail.Headers.Add("Disposition-Notification-To", txtSenderEmail.Text)
mail.Subject = Convert.ToString(txtSubject.Text).Trim()
mail.SubjectEncoding = System.Text.Encoding.UTF8
mail.Body = Convert.ToString(txtBody.Text).Trim()
mail.Body += imgTag
mail.BodyEncoding = System.Text.Encoding.UTF8
mail.IsBodyHtml = True
mail.Priority = MailPriority.High
Dim client As New SmtpClient()
client.Credentials = New System.Net.NetworkCredential(txtSenderEmail.Text, MyPassword)
client.Port = CInt(587) '587
client.Host = txtSMTP.Text '"smtp.gmail.com"
client.EnableSsl = CBool(0)
client.Timeout = 2000000
Try
client.Send(mail)
Catch ex As Exception
MsgBox(ex.Message)
End Try
推荐答案
这篇关于如何知道我的电子邮件是否读过的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!