Solved

how to send mail through c# for authenticated SMTP

Posted on 2004-10-05
5
189 Views
1 Endorsement
Last Modified: 2010-04-07
hi
how to send mail through c# for authenticated SMTP  ?

i have the following code

 SmtpMail.SmtpServer = "xxx.xxxx.xxx.xxx";
               MailMessage oMessage = new MailMessage();
               oMessage.BodyFormat = MailFormat.Text;
               oMessage.Priority = MailPriority.High;
               oMessage.From = "sasi@xxx.com";
               oMessage.To = "xxx@hotmail.com";
               oMessage.Subject = "Test Mail";
               oMessage.Body = "This is a test e-mail";
               SmtpMail.Send(oMessage);

now how to autheticate for the oMessage.From user using this component.

Thanks in advance
Regards,
Sasikumar.
1
Comment
Question by:ravisankar1978
  • 3
5 Comments
 
LVL 20

Expert Comment

by:ihenry
ID: 12226731
What .Net Framework are you working with now?
0
 
LVL 20

Expert Comment

by:ihenry
ID: 12226756
if version 1.1, read this article

SMTP Authentication With The MailMessage Class
http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=622
0
 
LVL 20

Accepted Solution

by:
ihenry earned 500 total points
ID: 12226776
Or this

SMTP Authentication using System.Web.Mail (CDOSYS)
http://www.codeproject.com/dotnet/SystemWeb_Mail_SMTP_AUTH.asp
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question