Вывод почты-это необработанный HTML-код в почтовом ящике gmail
I am creating email client application in windows forms. For sending mail, i am using Yarte control. When i am sending email, I am able to send the email but in my gmail inbox i am getting Output of mail is RAW HTML. For example- i am getting output like this. <pre> !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META content="text/html; charset=unicode" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.7601.17514"></HEAD> <BODY> <DIV dir=ltr> <DIV>Hello <BR></DIV>
В приведенном выше HTML мой вывод - это только "Привет", но он добавляет немного дополнительного необработанного html.
Пожалуйста помочь.
Что я уже пробовал:
i am using Yarte control. When i am sending email, I am able to send the email but in my gmail inbox i am getting Output of mail is RAW HTML. MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress(mailFrom); string mailAddresses = richtxtTo.Text; if(string.IsNullOrEmpty(mailAddresses)) { MessageBox.Show("Please specify atleast one recipient!"); return; } // This loop is used to send to multiple receiptents foreach (var address in mailAddresses.Split(new[] { ";" }, tringSplitOptions.RemoveEmptyEntries)) { mail.To.Add(mailAddresses); } //mail.To.Add(richtxtTo.Text); mail.Subject = mailSubject; mail.Body = htmlEditor1.Html; SmtpServer.Port = 587; SmtpServer.Credentials = new System.Net.NetworkCredential(mailTo, "Password"); SmtpServer.EnableSsl = true; SmtpServer.Send(mail); MessageBox.Show("Mail Sent"); htmlEditor1.Html = ""; richtxtTo.Text = ""; btnForward.Visible = true; btnReply.Visible = true;