Click here to Skip to main content
15,909,827 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi friends.
i would like create a project with send a mail with attachement.please help me to go ahead with this task.please help me.
thank you
Posted

 
Share this answer
 
Hi,

System.Net.Mail Class contains all methods (functions) to achieve this. Please have a look at MSDN:
msdn.microsoft.com/en-US/library/system.net.mail(v=vs.80).aspx[^]

System.Net.Mail also contains an class for E-Mail Attachments, have a look at this code example:
http://csharp.net-informations.com/communications/csharp-email-attachment.htm[^]

Depends which Provider (or lets say which smtp server) you're using, you must have a look for correct credentials, Port and maybe provider uses SSL. A good link with examples for different providers here:

C# Code snippet to send an Email with attachment from Outlook, Yahoo, HotMail, AOL and Gmail[^]

Wikipedia:
http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol[^]

Regards
 
Share this answer
 
v2
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900