i have made one Email Management System that can send email and save email as draft. i have one bigger issue for sending email with images. i tried lot of time but i'm not done with it. I just want to send Image Enabled Email to sender address.
here i store my email body as ntext data type to sql server and after that i just send to mail address. here i put my form screen shot for general idea. how i retrieve email body from ckeditor and linqpad result how i store it.
this is the form how i retrieve email body :

this is linqpad screen shot how i store email body to db:

now just focus last record with title "Image Enabled Email" it's have email body with images now i just want this image to retrieved email.
i also include final output of finally receiver got email to this form :

and this is the original mail view from gmail :
From: [email protected]
To:
Date: Tue, 23 Dec 2014 19:30:58 +0530
Subject: Image Enabled Email
<table border="0" cellpadding="1" cellspacing="1" style="width: 700px;">
<tbody>
<tr>
<td>
<img alt="" src="/NewsLetter/images/Winter.jpg" style="width: 500px; height: 375px;" /></td>
<td>
<h3>
<span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:28px;">This is Image Enabled Mail For Testing </span></span></h3>
</td>
</tr>
</tbody>
</table>
<p>
</p>
I just want this image that was i was set in email body should be visible to receiver email address.
-------------------- Upadted ------------------------
here i place my code to sending email from web application :
public static void SendReplyMail(string subject, string Host, string Port, string email, string password, string emails, string ccs, string bccs, string body, List<string> file_names)
{
MailMessage msg = new MailMessage();
System.Net.Mail.SmtpClient client = Util.GetSmtpClient();
msg.IsBodyHtml = true;
client.Host = Host;
System.Net.NetworkCredential basicauthenticationinfo = new System.Net.NetworkCredential(email, password);
client.Port = int.Parse(Port);
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = basicauthenticationinfo;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
msg.From = new MailAddress(email);
if (emails.Contains(","))
{
string[] values1 = emails.Split(',');
for (int i = 0; i < values1.Length; i++)
{
values1[i] = values1[i].Trim();
}
foreach (var item1 in values1)
{
msg.To.Add(new MailAddress(item1.ToString()));
}
}
else
{
msg.To.Add(new MailAddress(emails));
}
if (!string.IsNullOrEmpty(ccs))
{
if (ccs.Contains(","))
{
string[] values2 = ccs.Split(',');
for (int i = 0; i < values2.Length; i++)
{
values2[i] = values2[i].Trim();
}
foreach (var item2 in values2)
{
msg.CC.Add(new MailAddress(item2.ToString()));
}
}
else
{
msg.CC.Add(new MailAddress(ccs));
}
}
if (!string.IsNullOrEmpty(bccs))
{
if (bccs.Contains(","))
{
string[] values3 = bccs.Split(',');
for (int i = 0; i < values3.Length; i++)
{
values3[i] = values3[i].Trim();
}
foreach (var item3 in values3)
{
msg.Bcc.Add(new MailAddress(item3.ToString()));
}
}
else
{
msg.Bcc.Add(new MailAddress(bccs));
}
}
msg.Subject = subject;
msg.Body = body;
using (DataClassesDataContext db = new DataClassesDataContext())
{
for (int i = 0; i < file_names.Count; i++)
{
Attachment mailAttachment = new Attachment(Path.Combine(HttpRuntime.AppDomainAppPath, "EmailFiles/" + db.Files.Where(f => f.File_name.Equals(file_names[i].Substring(0,15))).Select(f => f.File_name + f.File_ext).SingleOrDefault().ToString()));
msg.Attachments.Add(mailAttachment);
}
}
client.Send(msg);
}
can some one have knowledge how to write image binary write when html body have image tag. please help me...