开发者

Sending Email in C# WinForms VS ASP.NET C#

开发者 https://www.devze.com 2023-01-08 14:02 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号