C# .Net Tutorial – How to Send E-mail with ASP.NET (tutorial Good for Beginners)


This is a very simple, introductory tutorial to ASP.NET (Active Server Pages) using C# and Visual Studio. It demonstrates how to create a web form and send an email from it. It’s great for anyone looking to build their very first C# .Net application.


Xem Thêm Bài Viết Khác:https://wijstaanvooronzegrondrechten.org/cong-nghe


  1. Hey, how can I send email without entering any email address especially password inside the network credentials. It should be base on the email inside my textbox. Great work anyway!

  2. Hallo Chris

    In the index.asp.cs, the mailmessage perimeter should be ordered in that way: MailMessage(from.Text, to.Text,subject.Text, body.Text), because you will never be able to send a mail to another person then you if you start mailmessage perimeter with (to.text). 😉

  3. Dude, you're a lifesaver! I haven't been able to make a working email form since the early 2000's lol.

    Just one thing, though. I do the majority of my website design in Dreamweaver CS5 and all I want to know is if there any way you could make a video showing how to do this in Dreamweaver with a Yahoo email account?

  4. Man I have been looking all over for how to do this and your explanation was the most straight forward and clear. Thanks Chris.

  5. Hello Chris. Thank you for this video. I've got a question – what changes would be made if we were to send to an Outlook email address from another Outlook email address?

  6. i getting this error if i use port 587 as u used.
    "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required." but if i use 465 it says Email sending Failure.
    Please Help.. Waiting for your valuable reply!!

  7. Are the files available to download? I have access to creating and posting a form and have the SMTP server name that IT instructed is all I need (no admin rights to it, just the SMTP server name). Our IT support doesn't have it in their scope to support creating our feedback form to provide the service our operators can use to report issues. Can the basic files just be dropped in and be edited to change the SMTP server name and addressee? Of course any help will be appreciated.

  8. iam getting error how to solve this kindly help me

    at System.Net.Mail.SmtpClient.Send(MailMessage message) at index.Button1_Click(Object sender, EventArgs e) in c:UsersJhasimDocumentsVisual Studio 2015WebSitessendmailindex.aspx.cs:line 32

  9. I am getting this exception, if someone can help me, It will be great!!

    at System.Net.Mail.SmtpClient.Send(MailMessage message) at aspnet_mailer.index.send_Click(Object sender, EventArgs e) in C:Userskeshav_gdocumentsvisual studio 2015Projectsaspnet_maileraspnet_mailerindex.aspx.cs:line 29

  10. why does the text boxes and the label and the button appear as a <HTML ELEMENT> in the properties?
    and there isn t any propertie i can t change anything
    and i m sure i followed him step by step
    i m using visual studio 2017 btw

  11. I'm trying to send e-mails from an ASP.NET Core application. Do you have a video on that or know of someone who does? I can't seem to find one. I'm thinking the concept should be the same as in this video for web forms. It seems like MailKit is the way to go with ASP.Net core, but I can't seem to find any good documentation for it. Thanks!

  12. Good tutorial. I love it but what if the to.text will fetch the email address from a database and the email address could be gmail, yahoo or any other related email, how can I do that. Please help. Thanks any way


Please enter your comment!
Please enter your name here