0
這不工作發送文本和html多部分電子郵件?但是,用戶在gmail中看不到任何文本/純文本部分?不能發送多部分電子郵件中的文本/純文本
Dim M As New Net.Mail.MailMessage("[email protected]", Configuration.ConfigurationSettings.AppSettings("Emailvalidation"))
M.To.Clear()
M.To.Add(New Net.Mail.MailAddress(TargetEmail, TargetName))
Select Case SA.Address.Province
Case "BC"
M.Bcc.Add(New Net.Mail.MailAddress("bobs email", "bob"))
End Select
M.Subject = Subject
Dim AV2 = Net.Mail.AlternateView.CreateAlternateViewFromString(M2.Body, New Net.Mime.ContentType("text/html"))
M.AlternateViews.Add(AV2)
Dim PT As String = PlainTextTemplate
Dim AV = Net.Mail.AlternateView.CreateAlternateViewFromString(PT, New Net.Mime.ContentType("text/plain"))
M.AlternateViews.Add(AV)