| Home » Categories » Multiple Categories | 
| Sample Code to Send email using ASP.NET1.1 | 
| Article Number: 83 | Rating: Unrated | Last Updated: Tue, May 1, 2012 at 11:11 PM | 
| Our mail server is configured with SMTP authentication and all your code need to use SMTP Authentication before you can send email. If your code does not use SMTP authentication, the email will not be sent. private void Page_Load(object sender, System.EventArgs e) {      MailMessage mail = new MailMessage();      mail.To = "[email protected]";      mail.From = "[email protected]";      mail.Subject = "this is a test email.";      mail.Body = "Some text goes here";      mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");  //basic authentication      mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "my_username_here"); //set your username here      mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "super_secret");  //set your password here      SmtpMail.SmtpServer = "localhost"; //your real server goes here      SmtpMail.Send( mail ); } | 
| 
							Attachments     
									There are no attachments for this article.
							 	  | 
| 
										My website session times out earlier than expected. Why?
										 Viewed 5056 times  since  Tue, May 1, 2012  
										How to Deploy and host .Net Core 2 and Angular 6 app
										 Viewed 13233 times  since  Tue, Oct 23, 2018  
										How to solve the Let’s Encrypt SSL on ASP.NET Core
										 Viewed 9664 times  since  Mon, Jul 17, 2017  
										How to solve ReportViewer error message: "An error has occurred during report processing. Input string was not in a correct format"
										 Viewed 8304 times  since  Tue, Jun 18, 2013  
										I cannot find a way to enable ASP.NET 4.5 on my Control Panel
										 Viewed 11113 times  since  Tue, Sep 11, 2012  
										I get an error Server.CreateObject Failed when I try to use CDONTs. What can I do?
										 Viewed 3011 times  since  Tue, May 1, 2012  
										How can I enable ASP.NET 3.5 on your Control Panel?
										 Viewed 3970 times  since  Wed, May 2, 2012  
										About Azure Key Vault
										 Viewed 1827 times  since  Mon, Nov 2, 2020  
										Sample Code to Send email using ASP.NET 2
										 Viewed 9797 times  since  Tue, May 1, 2012  
										How To Solve Problem with Connection String on EF (Entity Framework) 4 or above
										 Viewed 31986 times  since  Mon, Apr 1, 2013  | 

 Subscribe to Article
Subscribe to Article Print Article
Print Article Email Article to Friend
Email Article to Friend
							 Export to PDF
Export to PDF Export to MS Word
Export to MS Word Tweet This Article
Tweet This Article Digg It
Digg It Stumble Upon
Stumble Upon Del.icio.us
Del.icio.us