Click here to Skip to main content
15,885,278 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Sending an Email in C# with or without attachments: generic routine.

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
3 Mar 2011CPOL 8.4K   5   1
I would use Attachment [^] instead of MailAttachment[^]One should also use System.net.mail[^] instead of System.Web.Mail[^] which is now obsolete.
I would use Attachment [^] instead of MailAttachment[^]

One should also use System.net.mail[^] instead of System.Web.Mail[^] which is now obsolete.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Netherlands Netherlands

Read my personal blog at www.manasbhardwaj.net.


Comments and Discussions

 
GeneralI didn't use Attachment instead as my programs only send byt... Pin
OriginalGriff2-Mar-11 21:14
mveOriginalGriff2-Mar-11 21:14 

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.