Here is a small script that actually send emails using asp.net system.webmail class:
<% @Page Language="C#" %>
<% @Import Namespace="System.Web.Mail" %>
<%
MailMessage msgMail = new MailMessage();
msgMail.To = "Recipient Email Address";msgMail.From = "Sender’s email address";
msgMail.Subject = "Subject of an email";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = "Body contents";
msgMail.Attachments.Add(new MailAttachment("c:\\shane.xls"));
SmtpMail.Send(msgMail);
Response.Write("Email has been sent");
%>
Enjoy ASP.NET coding !!!
Read More: ASP - Simple Login Script
ASP.Net - Code For File Download
What is Fantastico and how is it useful?
Sign up or log in