how to send mail through c# for authenticated SMTP

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

i have the following code

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

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

Thanks in advance
Question by:ravisankar1978
  • 3
LVL 20

Expert Comment

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

Expert Comment

ID: 12226756
if version 1.1, read this article

SMTP Authentication With The MailMessage Class
LVL 20

Accepted Solution

ihenry earned 500 total points
ID: 12226776
Or this

SMTP Authentication using System.Web.Mail (CDOSYS)

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 ( 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