WebSecureStores Customer Portal Language
 
Information
Article ID169
Created On2/2/2006
Modified5/13/2009
ASP.net send Email

Please save this code to your wwwroot folder as sendmail.aspx:
You need to change the usernames and smtp server name to be valid. Your welcome email has smtp and user information

<% @Page Language="C#" %>
<% @Import Namespace="System.Web.Mail" %>
<%
MailMessage msgMail = new MailMessage();
System.Web.Mail.SmtpMail.SmtpServer="mail.websecurestores.com";
msgMail.To = "myemail@mydomain.com";
msgMail.From = "webmaster@WebSecureStores.com";
msgMail.Subject = "This is test email";

msgMail.BodyFormat = MailFormat.Html;
string strBody = "<html><body><b>Hello World</b>" +
   " <font color=\"red\">ASP.NET</font></body></html>";
msgMail.Body = strBody;

SmtpMail.Send(msgMail);

Response.Write("Email was sent");
%>