Sample Code to send mail, using SMTP Authentication (the only way to send emails out from servers in order to reduce spam)
---------------------------------
Dim msg As New MailMessage("to@example.com", "<emailaddress in your domain>")
msg.Subject = "Subject here"
msg.Body = "Body here"
Dim client As New SmtpClient("localhost")
client.Credentials = New Net.NetworkCredential("<email address in your domain>", "<password of this emailaccount>")
client.Send(msg
---------------------------------
* Replace you@example.com and password with an email account you've already created through the control panel.
Here is the C# Version
System.Net.Mail.MailMessage eMail = new System.Net.Mail.MailMessage();
eMail.IsBodyHtml = true;
eMail.Body = body;
eMail.From = new System.Net.Mail.MailAddress(fromEmail);
eMail.To.Add(toEmail);
eMail.Subject = subject;
System.Net.Mail.SmtpClient SMTP = new System.Net.Mail.SmtpClient();
SMTP.Credentials = new System.Net.NetworkCredential("user","pass");
SMTP.Host = "localhost";
SMTP.Send(eMail);