views:

35

answers:

1

Hey All,

I was just wondering if anybody else has had the same problem as me.

I am trying to send emails from a simple form using ASP.NET (VB/C# I don't really care), and what does my head in severely is the fact that it seems so much harder to send an email using ASP.NET than it is in WinForms!

In WinForms, I can write some code to send an email in 2 minutes. But after reading tutorial after tutorial on ASP.NET I cannot figure out how to do it! It's so weird.

One thing that I don't get is that NONE of the examples demonstrate the use of mail.Username = ""; or mail.Password = ""; (For Example). They don't seem to use usernames or passwords when connecting to the server.

How can I send an email in asp.net just like I do in C# WinForms, or atleast if not the same way, is there a simple way?

Thank you

+2  A: 

Using username/password:

http://www.aspnettutorials.com/tutorials/email/email-auth-aspnet2-csharp.aspx

jgauffin
Awesome. It works. Thank you heaps :D
lucifer