Click here to Skip to main content
15,884,014 members
Home / Discussions / C#
   

C#

 
GeneralRe: Connecting to a database and transferring data securely Pin
SledgeHammer0117-Oct-12 4:49
SledgeHammer0117-Oct-12 4:49 
AnswerRe: Connecting to a database and transferring data securely Pin
Eddy Vluggen16-Oct-12 12:19
professionalEddy Vluggen16-Oct-12 12:19 
AnswerRe: Connecting to a database and transferring data securely Pin
Bernhard Hiller16-Oct-12 21:33
Bernhard Hiller16-Oct-12 21:33 
AnswerRe: Connecting to a database and transferring data securely Pin
BobJanova17-Oct-12 1:51
BobJanova17-Oct-12 1:51 
GeneralRe: Connecting to a database and transferring data securely Pin
User 940410617-Oct-12 9:45
User 940410617-Oct-12 9:45 
GeneralRe: Connecting to a database and transferring data securely Pin
SledgeHammer0117-Oct-12 10:02
SledgeHammer0117-Oct-12 10:02 
GeneralRe: Connecting to a database and transferring data securely Pin
User 940410617-Oct-12 10:34
User 940410617-Oct-12 10:34 
Questionsend email html format in email body asp.net c# Pin
rahultiway1916-Oct-12 7:51
rahultiway1916-Oct-12 7:51 
Hello Sir This is rahul tiwary
My problem is that i want to mail Email body in asp.net C#.not Attechment .but not retrive Can u help me .my code is

try
{
string EmailID = dt.Rows[0][1].ToString();
MailMessage MyMessage1 = new MailMessage();
string Bodyurl = "http://www.basnext.com/CheckOrderStatus.aspx?OrderTrackingNomber=" + Ordertrackingnumber + "&UserID=" + Session["UserID"].ToString() + "";
MailMessage MyMessage = new MailMessage();
MyMessage.To.Add(EmailID);
MyMessage.From = new MailAddress("sales@basnext.com");
MyMessage.Subject = "Order Details";
MyMessage.Body = "";
MyMessage.IsBodyHtml = true;


MyMessage.Body = "<HTML><BODY BGCOLOR=#0000FF>

Dear " + Session["UserName"].ToString() + "


Thank you for making an Order Detail of product items.

We appreciate to serve you.

Your Order Tracking Number is " + Ordertrackingnumber + ". We will get you back soon.


You Can Check your Order Status anytime on clicking below porvided link.


" + Bodyurl + "

Thanks & Regard
Sales Team
Email:- sales@stsinfo.com.
</BODY></HTML>";
Stream mem = cry.ExportToStream(ExportFormatType.PortableDocFormat);
mem.Seek(0, System.IO.SeekOrigin.Begin);
Attachment att = new Attachment(mem, "OrderDetails.pdf", "application/pdf");
MyMessage.Attachments.Add(att);
MyMessage.Body = "<HTML><BODY BGCOLOR=#0000FF>"+att+"

Dear " + Session["UserName"].ToString() + "


Thank you for making an Order Detail of product items.

We appreciate to serve you.

Your Order Tracking Number is " + Ordertrackingnumber + ". We will get you back soon.


You Can Check your Order Status anytime on clicking below porvided link.


" + Bodyurl + "

Thanks & Regard
Sales Team
Email:- sales@stsinfo.com.
</BODY></HTML>";
Stream ms = cry.ExportToStream(ExportFormatType.WordForWindows);
ms.Seek(0, System.IO.SeekOrigin.Begin);
Attachment att1 = new Attachment(ms, "OrderDetails.doc", "application/.doc");
MyMessage1.Attachments.Add(att1);
MyMessage1.To.Add("rahultiwary19@stsinfo.com");
MyMessage1.From = new MailAddress("sales@basnext.com");
MyMessage1.Subject = "Order Details";
MyMessage1.IsBodyHtml = true ;
MyMessage1.Body = "<HTML><BODY BGCOLOR=#0000FF>

Dear Sales Team


Mr. " + Session["UserName"].ToString() + " has made an Order Details of some products item.

Please find the attachment of the Order Details.


Thanks & Regard
</BODY></HTML>";

MyMessage1.Body = "";
smtpClient.Host = "mail.bioroles.com";
// smtpClient.Host = "174.142.169.34";
smtpClient.Port = 25;
smtpClient.UseDefaultCredentials = true;
smtpClient.Credentials = new System.Net.NetworkCredential("sales@bioroles.com", "**********");
//smtpClient.Credentials = new System.Net.NetworkCredential("sales@basnext.com", "***********");
smtpClient.Send(MyMessage);
smtpClient.Send(MyMessage1);
mem.Dispose();
ms.Dispose();
}
catch (Exception ex)
{
//litStatus.Text = ex.ToString();
}


}

Please Help

AnswerRe: send email html format in email body asp.net c# Pin
fjdiewornncalwe16-Oct-12 8:33
professionalfjdiewornncalwe16-Oct-12 8:33 
AnswerRe: send email html format in email body asp.net c# Pin
Bernhard Hiller16-Oct-12 21:29
Bernhard Hiller16-Oct-12 21:29 
QuestionFunction Accepting Parameters of Any Type Pin
ASPnoob16-Oct-12 2:17
ASPnoob16-Oct-12 2:17 
AnswerRe: Function Accepting Parameters of Any Type Pin
Pete O'Hanlon16-Oct-12 2:26
mvePete O'Hanlon16-Oct-12 2:26 
GeneralRe: Function Accepting Parameters of Any Type Pin
Dave Doknjas16-Oct-12 11:14
Dave Doknjas16-Oct-12 11:14 
AnswerRe: Function Accepting Parameters of Any Type Pin
Eddy Vluggen16-Oct-12 3:01
professionalEddy Vluggen16-Oct-12 3:01 
Questionhow to get an data from data Gride view in C# Pin
vinodnchavan15-Oct-12 21:39
vinodnchavan15-Oct-12 21:39 
AnswerRe: how to get an data from data Gride view in C# Pin
Richard MacCutchan15-Oct-12 22:16
mveRichard MacCutchan15-Oct-12 22:16 
AnswerRe: how to get an data from data Gride view in C# Pin
Abhinav S16-Oct-12 20:36
Abhinav S16-Oct-12 20:36 
QuestionSuggest a solution. Pin
Ambika Jadhav15-Oct-12 20:36
Ambika Jadhav15-Oct-12 20:36 
AnswerRe: Suggest a solution. Pin
Pete O'Hanlon15-Oct-12 22:10
mvePete O'Hanlon15-Oct-12 22:10 
AnswerRe: Suggest a solution. Pin
Eddy Vluggen16-Oct-12 2:03
professionalEddy Vluggen16-Oct-12 2:03 
GeneralRe: Suggest a solution. Pin
Pete O'Hanlon16-Oct-12 2:42
mvePete O'Hanlon16-Oct-12 2:42 
GeneralRe: Suggest a solution. Pin
Eddy Vluggen16-Oct-12 3:00
professionalEddy Vluggen16-Oct-12 3:00 
GeneralRe: Suggest a solution. Pin
Ambika Jadhav16-Oct-12 19:56
Ambika Jadhav16-Oct-12 19:56 
Questionplay video in memory stream Pin
SumithF15-Oct-12 19:48
SumithF15-Oct-12 19:48 
AnswerRe: play video in memory stream Pin
Pete O'Hanlon15-Oct-12 23:24
mvePete O'Hanlon15-Oct-12 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.