CodeWidgets.com Online Source Code Library -ASP, ASP.NET, VB, VB.Net, Microsoft® Access, Javascript, VBScript, Website Design, Web Applications, Custom Programming Services Available.

 CodeWidgets.com ASP, ASP.NET, VB, VB.Net,
Microsoft® Access, Javascript, VBScript,
Website Design, Web Applications
Shopping Cart (0) Items $0.00      
 CodeWidgets.com
CodeWidgets.com

 

Website Stats to Date

Pages Viewed 4,401,732
Visitors 1,206,536
Widgets Viewed 3,009,755
Since January 1/2003
 
 
Active Users: 14
 

 
PayPal: Secure online payments!
 
Widget #CS0051

Send Email Using SMTP Mail (ASP.NET)

Send Email Using SMTP Mail (ASP.NET)

Send Link

Questions

Currency Conv.
  Widget Info  
VB.Net Class
CMailMessage.vb
Send Email from your ASP.Net web pages
Copy and paste the code below into a VB.Net Class Module

'STARTCODE
Imports System.Web.Mail
Public Class CMailMessage
'SMTP Mail Class
'Widget# CS0051 CodeWidgets.com
'SYNTAX to use the Class
'/////////////////
'Dim MailMessage As New CMailMessage()
'MailMessage.Send("RecipientEmail", "SendersEmail", "The Subject", "This is the Message Body", Mail.MailFormat.Html)
' MailMessage = Nothing
'/////////////////
Public Sub Send(ByVal m_Recipient As String, ByVal m_Sender As String, ByVal m_Subject As String, ByVal m_Message As String, ByVal m_Format As Mail.MailFormat)
Dim Msg As New MailMessage()
With Msg
.To = m_Recipient
.From = m_Sender
.Subject = m_Subject
.BodyFormat = m_Format
.Body = m_Message
' Substitute HOST with the Local SMTP Domain name found in the IIS Managment Console
Dim strMailHost As String = "HOST"
SmtpMail.SmtpServer = strMailHost
SmtpMail.Send(Msg)
End With
End Sub
End Class
'ENDCODE
 Licensing
Format: Plug & Play Code
Copy the Source Code Above..
Licencing Terms: No Restrictions
Re-Distribution Permitted
This source code is provided to you "as is" without warranty
CLICK HERE FOR TERMS OF USE
Copyright 2002-2006 Comrie Software Solutions
 Related Widgets

Add Sounds to button events. ASP.NET
Create a Session Database Connection through code (ASP.NET)
HTML EMail Merge using Microsoft® Access
Recommended Reading For Developers

ShoppingCart Empty
Services Contact Info Legal Info
Designated trademarks and brand names are the property of their respective owners.

By accessing this website it is assumed that you agree to the TERMS OF USE.

Send questions or comments regarding this website to  Comrie Software Solutions.

Click here for a complete list of available Widgets.