?
Solved

how to send mail through c# for authenticated SMTP

Posted on 2004-10-05
5
Medium Priority
?
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
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…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 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