i have an interesting problem. i am using System.Net.Mail while sending mail. when i try to send html formiat mails it add 3D hwre start with =
i add code below for expamle
CODE
Imports System.IO
Imports Microsoft.VisualBasic
Imports System
Imports System.Drawing.Printing
Imports System.Net.Mail
Imports System.Net
Dim mail As New MailMessage()
mail.From = New MailAddress("from@mail.com", "test mail")
mail.To.Add("to@mail.com")
mail.Subject = "Test Message"
mail.SubjectEncoding = System.Text.Encoding.UTF8
mail.BodyEncoding = System.Text.Encoding.UTF8
mail.IsBodyHtml = True
mail.Body = "Test Message"
Dim smtp As New SmtpClient()
smtp.Credentials = New Net.NetworkCredential("user", "pass")
smtp.Host = "host ip"
smtp.Port = "port"
If m_ssl = 1 = True Then
smtp.EnableSsl = True
ElseIf m_ssl = 0 Then
smtp.EnableSsl = False
End If
smtp.Send(mail)
when i click to send it send. with sendind there is no problem.
But when i change body it happaed interesting things. like
CODE
Dim imgBuffer() As Byte = File.ReadAllBytes(img)
Dim imageHTML As String = String.Format("<img src=""data:image/png;base64, {0}", Convert.ToBase64String(imgBuffer))
dim m_text as string
m_text +="<html>"
m_text +="<body>"
m_text +="test="
m_text +="<img src=""data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/ xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3
JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2Jo
Q9LE1exdlYvBBeZ7jqch9// q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5Er
kJggg=="" />"
m_text +="</body>"
m_text +="</html>"
aftrer text= it add 3D
in mail source it look line test=3D and page not looking good.
the sourse i send up there in mail sourse it look like this:
<html>=0D=0A<body>=0D=0Atest=3D=0D=0A<img src=3D"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/ xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3
JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2Jo
Q9LE1exdlYvBBeZ7jqch9// q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5Er
kJggg=3D=3D"=
/>=0D=0A</body>=0D=0A</html>=0D=0A
why it is addin these extra codes in mail ? how can i correct this problem?