Solved

how to send mail through c# for authenticated SMTP

Posted on 2004-10-05
5
187 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

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 …
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
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…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

777 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