How did I send email from ASP.net ?
You have to use System.Web.Mail namespace
Below is the code snippets :
MailMessage myemail = new MailMessage();
myemail.From = "firstname.lastname@example.org"
myemail.To = email@example.com;
myemail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;
myemail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "myusername";
myemail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "mypass";
Replace yourdomain.com with your domain name.
Replace user name with your mail username (full address)
Replace password with your email password.
Remember, you have to authenticate yourself before you can send email from our server or else the mail will not be delivered.
Was this answer helpful?
Our SMTP Server requires authentication before you can send email, But If your ASP or ASP.net...
Yes, that is possible. In fact you can set the read and write permission yourself. Our control...
ASP.net has its own built-in error handling. To set up custom error handling for your ASP.net...
Custom error setting is a web server setting that sets your website Error Pages, but you can...