Hi
Have a look at system.web.mail, the code extract is a console app
I know this is in c# but will easliy translate to
VB
using System;
using System.Web.Mail;
namespace WebMail {
class Class1 {
static void Main(string[] args) {
try {
MailMessage oMsg = new MailMessage();
// TODO: Replace with sender e-mail address.
oMsg.From = "<insert email address>";
// TODO: Replace with recipient e-mail address.
oMsg.To = "<insert email address>";
oMsg.Subject = "Send Using Web Mail";
// SEND IN HTML FORMAT (comment this line to send plain text).
oMsg.BodyFormat = MailFormat.Html;
// HTML Body (remove HTML tags for plain text).
oMsg.Body = "<HTML><BODY><B>Hello World!</B></BODY></HTML>";
// ADD AN ATTACHMENT.
// TODO: Replace with path to attachment.
String sFile = @"C:\temp\test.doc";
MailAttachment oAttch = new MailAttachment(sFile, MailEncoding.Base64);
oMsg.Attachments.Add(oAttch);
// TODO: Replace with the name of your remote SMTP server.
SmtpMail.SmtpServer = "<insert smtp adddress>";
SmtpMail.Send(oMsg);
oMsg = null;
oAttch = null;
}
catch (Exception e) {
Console.WriteLine("{0} Exception caught.", e);
}
}
}
}
Duncan