VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple function to send an email message using CDO

by Roderick Thompson (12 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 1st February 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simple function to send an email message using CDO

Rate Simple function to send an email message using CDO



Function SendEMail (MsgFrom, MsgTo, MsgSubject, MsgText)
Dim objCDO As New CDONTS.NewMail
objCDO.To = MsgTo
objCDO.From = MsgFrom
objCDO.Importance = 1 
objCDO.Subject = MsgSubject
objCDO.Body = MsgText
objCDO.Send
Set objCDO = Nothing
End Function


For VBScript:
Function SendEMail (MsgFrom, MsgTo, MsgSubject, MsgText)
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = MsgTo
objCDO.From = MsgFrom
objCDO.Importance = 1 
objCDO.Subject = MsgSubject
objCDO.Body = MsgText
objCDO.Send
Set objCDO = Nothing
End Function

Download this snippet    Add to My Saved Code

Simple function to send an email message using CDO Comments

No comments have been posted about Simple function to send an email message using CDO. Why not be the first to post a comment about Simple function to send an email message using CDO.

Post your comment

Subject:
Message:
0/1000 characters