need options for sending e-mail from a c# win application.

Apr 16 2009 7:10 PM
yes, I need some different options as to how I can send an e-mail from a c# windows application.  I don't have a smpt server running on my machine and was not sure if I needed one.

I basically want to send an e-mail text message (see http://www.slipstick.com/outlook/smscell.htm).

Here's what I have:
... using System.Web.Mail;  ...
MailMessage mail = new MailMessage();
mail.From = "[email protected]";
mail.To = "[email protected]";
mail.Subject = "test";
mail.Body = "test body";
SmtpMail.SmtpServer = ""; // not sure about this...? ("www.toad.com".. or something?)
// and then send the mail
SmtpMail.Send(mail);

Thanks Tons!!


Answers (3)