Hi
I am not familiar in how to create HTML Embeded emeil.
Currently I am using below code, It is work fine and send email
with plain text. It is not look nice. I need to formated embeded
email with logo and below information together to the email. I have
tried in Google. But could not find proper solution. I am also getting confusion
Pls advice me.
Thank you in advance
Maideen
Below is code ( currently I am using , it is fine)
Private Sub SendEmail(EmailAddress As String)
Dim mail As New MailMessage()
mail.To.Add(EmailAddress)
mail.From = New MailAddress("xxxxxx@xxx.com")
mail.CC.Add(Me.txtSAgentEmail.Text)
mail.Subject = "Complaint"
mail.Body = "Thank you for your suggession " & "<br>"
mail.Body = mail.Body & " Date:- " & Date & "<br>"
mail.Body = mail.Body & " Case ID:- " & caseid & "<br>"
mail.Body = mail.Body & " Pakcage:- " & txtPKCode & "<br>"
mail.Body = mail.Body & " Subscriber ID:- " & Code & "<br>"
mail.Body = mail.Body & " Subscriber Name:- " & Name & "<br>"
mail.Body = mail.Body & " Company:- " & Company & "<br>"
mail.Body = mail.Body & " Job Title:- " & JobTitle & "<br>"
mail.Body = mail.Body & " Address:- " & Address1 & "<br>"
mail.Body = mail.Body & " Address:- " &BAddress2 & "<br>"
mail.Body = mail.Body & " Post Code:- " & PosCode & "<br>"
mail.Body = mail.Body & " City:- " & City & "<br>"
mail.Body = mail.Body & " State:- " & State & "<br>"
mail.Body = mail.Body & " Country:- " & Country & "<br>"
mail.Body = mail.Body & " Tel:- " & TelNo & "<br>"
mail.Body = mail.Body & " HP:- " & HPNo & "<br>"
mail.Body = mail.Body & " Compalints:- " & Me.txtComplaints.Text & "<br>"
mail.Body = mail.Body & " Status:- " & Status & "<br>"
mail.IsBodyHtml = True
Dim smtp As New SmtpClient()
smtp.Host = "smtp.xxxx.com"
smtp.EnableSsl = True
Dim NetworkCred As New System.Net.NetworkCredential()
NetworkCred.UserName = mail.From.Address
NetworkCred.Password = "password"
smtp.UseDefaultCredentials = False
smtp.Credentials = NetworkCred
smtp.Port = 587
smtp.Send(mail)
End Sub