Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > mail attachment program in c#

Reply
Thread Tools

mail attachment program in c#

 
 
vinodkus@gmail.com
Guest
Posts: n/a
 
      06-01-2007
MailMessage MyMail = new MailMessage();
MyMail.To = txtTo.Text;
MyMail.From = txtFrom.Text;
MyMail.Subject = txtSubject.Text;
MyMail.Cc = txtCC.Text;
MyMail.Body = txtBody.Text;

******** MyMail.Attachments.Add(how can u put browse file
inside it);*****************

SmtpMail.Send(MyMail);

please give full code
i have done it in vb.net but i want to do it in c#

 
Reply With Quote
 
 
 
 
Michael Nemtsev
Guest
Posts: n/a
 
      06-01-2007
Hello http://www.velocityreviews.com/forums/(E-Mail Removed),

> MailMessage MyMail = new MailMessage();
> MyMail.To = txtTo.Text;
> MyMail.From = txtFrom.Text;
> MyMail.Subject = txtSubject.Text;
> MyMail.Cc = txtCC.Text;
> MyMail.Body = txtBody.Text;
> ******** MyMail.Attachments.Add(how can u put browse file
> inside it);*****************


which file?

See msdn http://msdn2.microsoft.com/en-us/lib...ilmessage.aspx

> SmtpMail.Send(MyMail);
>
> please give full code
> i have done it in vb.net but i want to do it in c#


Try online code translators http://www.carlosag.net/Tools/CodeTr...r/Default.aspx
http://www.developerfusion.com/utili...sharptovb.aspx

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mail attachment program using mailmessage Deep ASP General 2 06-14-2010 01:48 PM
mail Attachment program in c# vinodkus@gmail.com ASP .Net 1 06-02-2007 02:15 PM
Problem in receving mail with attachment patelvinay.visnagar@gmail.com ASP .Net 2 11-10-2005 01:17 PM
TB fail to send mail with attachment Klaus Firefox 3 08-18-2005 10:07 PM
reply to e-mail without its attachment Davide Firefox 6 11-13-2003 02:25 PM



Advertisments