mranderson
New Member
I need to send a html file(which contains a iframe) inside a email body.The html file is working fine in a browser and playing a video.But when i send it inside email body,iframe tag is not getting interpreted so does not show in the body.This is html file.\[code\]<b>Aman</b><iframe height="390" frameborder="0" width="640"src="http://www.youtube.com/embed/Sf5T5KjMpJU?wmode=transparent"title="YouTube video player"></iframe>\[/code\]Email body only displaying a "Aman" in bold.This is C# code.\[code\] StreamReader reader = File.OpenText("C:\\Users\\Girish\\Desktop\\amrit\\Jeff_Project\\indeex.html"); string getemail = textbox_email.Text; System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add(getemail); message.Subject = "Hello"; message.From = new System.Net.Mail.MailAddress("sendingemail"); //message.Body = "This is message body"; message.IsBodyHtml = true; message.Body = reader.ReadToEnd(); System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com"); smtp.Credentials = new System.Net.NetworkCredential("sendingemail", "password"); smtp.EnableSsl = true; smtp.Send(message); Response.Write("Sent");\[/code\]Why iframe is not being interpret?Am i missing anything?Please help and provide solutions.Thanks in advance.