now i was develop a one project.i will include a upload folder all the image store that folder.. how to send a email in that image
pls help me...........
if (txtemail.Text != "")
{
try
{
// Mail Using Domain
MailMessage mM = new MailMessage();
mM.From = new MailAddress("kumar@availtechnologies.net", "Travel Invite");
mM.To.Add(new MailAddress(txtemail.Text));
mM.Subject = txtsubject.Text;
if (txtsubject.Text != "" && var.ToString() != "")
{
mM.Body = ConvertToHtmlFile(var.ToString());
}
mM.IsBodyHtml = true;
mM.Priority = MailPriority.High;
SmtpClient sC = new SmtpClient("webmail.availtechnologies.net");
sC.Port = 25;
sC.Credentials = new System.Net.NetworkCredential("kumar@availtechnologies.net", "seetha07");
//sC.EnableSsl = true;
sC.Send(mM);
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
}
#region "Convert To Html File"
public static string ConvertToHtmlFile(string var )
{
string myHtmlFile = "";
StringBuilder myBuilder = new StringBuilder();
myBuilder.Append("<html xmlns='http://www.w3.org/1999/xhtml'>");
myBuilder.Append("<head>");
myBuilder.Append("<title>");
myBuilder.Append("Page-");
myBuilder.Append("Instant Enquiry");
myBuilder.Append(Guid.NewGuid().ToString());
myBuilder.Append("</title>");
myBuilder.Append("</head>");
myBuilder.Append("<body>");
myBuilder.Append("<table width='1003' border='0' align='center' cellpadding='0' cellspacing='0'>");
myBuilder.Append("<tr>");
myBuilder.Append("<td>");
myBuilder.Append("<table>");
myBuilder.Append("<tr>");
myBuilder.Append("<td background='http://availtechnologies.net/upload/ Down'+var+'.jpg' width='200' height='42'>");
myBuilder.Append("");
myBuilder.Append("</td>");
myBuilder.Append("</tr>");
myBuilder.Append("" + var.ToString() + "");
myBuilder.Append("</table>");
myBuilder.Append("</table>");
myBuilder.Append("</body>");
myBuilder.Append("</html>");
myHtmlFile = myBuilder.ToString();
return myHtmlFile;
}
#region "Convert To Html File VISA"
public static string ConvertToHtmlFileVisa(String visaamount)
{
string myHtmlFile = "";
StringBuilder myBuilder = new StringBuilder();
myBuilder.Append("<table width='980' border='0' align='center' cellpadding='0' cellspacing='0'>");
myBuilder.Append("<tr>");
myBuilder.Append("<td class='normaltxt1' width='415'>Visa Amount");
myBuilder.Append("</td>");
myBuilder.Append("<td class='normaltxt1' width='196'>" + visaamount.ToString() + "");
myBuilder.Append("</td>");
myBuilder.Append("<td class='normaltxt1' width='196'> ");
myBuilder.Append("</td>");
myBuilder.Append("</tr>");
myBuilder.Append("</table>");
myHtmlFile = myBuilder.ToString();
return myHtmlFile;
}
#endregion