PDA

View Full Version : ASP.NET C# e-mail form code



ed.quinn
11-05-2003, 03:37 PM
I use ASP.NET and C# with a project I am working on at the moment. The .NET Framework has an SmtpMail class built into it which works really well.

I wrote some code to send an e-mail when I get a PayPal IPN response and it took less than an hour to implement.



MailMessage message = new MailMessage();
message.From = from;
message.To = to;
message.Subject = subject;
message.Body = body;
message.BodyFormat = bodyFormat;


SmtpMail.SmtpServer = smtpServer;
SmtpMail.Send(message);

All you need to do is add your own information to the variables.

If anyone would like any further information about this or any other C# question, I'll try and answer it for you!

Cheers,
Ed

Nargule
11-09-2003, 09:08 AM
There is a big gap in your poll. I know what c# is but I am far from "I can just about figure it all out".