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 wha开发者_JAVA百科t 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
Using username/password:
http://www.aspnettutorials.com/tutorials/email/email-auth-aspnet2-csharp.aspx
精彩评论