using System;
using System.Net;
using System.Web.Mail;
class SimpleEmail
{
public static void Main()
{
string from = "youremail@email.com";
string to = "myemail@email.com";
string subject = "This is the subject line";
string body = "This is the body of the message";
SmtpMail.SmtpServer = "smtp.myemail.com";
SmtpMail.Send(from, to, subject, body);
}
}
Related posts:
- Email example <%@Page Explicit="False" Language="VB" Debug="True" %> <%@Import Namespace="System.Web.Mail" %> <% Dim...
- Sending an HTML email <% Dim objCdonts , strHTML Set objCdonts = Server.CreateObject(“CDONTS.NewMail”) ‘now...
- Send an email <% ‘declare our variables Dim strMessage , objCDO Set objCDO...
- Email function <% Function SendMail(mTo , mFrom , mSubject , mBody) Set...
- Sending an e-mail attachment <% Dim objCDONTS ‘create an instance of the object Set...
Related posts brought to you by Yet Another Related Posts Plugin.

