Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 426

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/templates/ja_purity/ja_templatetools.php on line 49
Send Email with VB.Net - The Scripts Library Community

Free Programming Tutorials & Source Code

 
  • Increase font size
  • Default font size
  • Decrease font size
Home Visual Basic.NET Send Email with VB.Net

Send Email with VB.Net

E-mail
(2 votes, average: 4.50 out of 5)


Sending email with VB.Net is easy. First, you have to add the webmail namespace:

Imports System.Web.Mail
Here is the source code:
 Sub Send_Email()
Dim SmtpServer As SmtpMail
SmtpServer.SmtpServer = "your smtp server goes here"
Dim myMessage As MailMessage = New MailMessage()
myMessage.Body = "Hi, this is a test email using vb.net"
myMessage.From = "fromEmail"
myMessage.To = "toEMail"
myMessage.Subject = "test email"
SmtpServer.Send(myMessage)
End Sub