Send Email from C# App

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Hi guys one question, i have this code, it works for a smtp that doesn't ask
for autentification

using System.Web.Mail;

MailMessage mail = new MailMessage();

mail.To="(e-mail address removed)";

mail.Subject="descr C#";

[email protected];

mail.Body = "some text";

SmtpMail.SmtpServer = "smtp.domain.com";

SmtpMail.Send(mail);



My smtp requires autentification but i dont know where to configurate it
maybe some as SmtpMail.SmtpServer = "smtp.domain.com"; some thing else, but
SmtpMail doesn't has a property user or passwd, how can i do it or i need
to use other component to use smtp autentification?

maybe using System.Net.Mail??



Regards.
Ricardo.
 
I have a 1.1 and 2.0 downloadable example of email sending.... with all the
authenication methods one might encounter.

spaces.msn.com/sholliday/

2/8/2006 entry
 
Back
Top