VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Send an e-mail to a SMTP server without need for IIS/CDONT, in VBScript. Embed attachments, use RTF

by Anonymous (267 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 19th February 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Send an e-mail to a SMTP server without need for IIS/CDONT, in VBScript. Embed attachments, use RTF HTML formatting, and so on

Rate Send an e-mail to a SMTP server without need for IIS/CDONT, in VBScript. Embed attachments, use RTF



' Download it from http://www.vahland.com/pub/aemail.dll
' and register it on your machine.
' Read http://www.vahland.com/pub/aemail.htm for more info

WScript.Echo "Be sure to have the FREEWARE AEmail.dll registered on your system"
WScript.Echo "Check out the code header about how to obtain the component."
 
Set aeObj = CreateObject("ActivXperts.SmtpMail")

Wscript.Echo "ActivEmail " & aeObj.Version & " demo."

aeObj.HostName = "smtp.myserver.com"
aeObj.FromAddress = "[email protected]"
aeObj.FromName = "My Name"
aeObj.AddTo "[email protected]", "My friend Roger"
aeObj.Subject = "Sample 02 - first email"
aeObj.Body = "Hello my friend," & vbCrLf & "How are you doing?" & vbCrLf & "Regards."
aeObj.Send
Wscript.Echo "Result: " & aeObj.LastError

aeObj.Clear

aeObj.HostName = "smtp.myserver.com"
aeObj.FromAddress = "[email protected]"
aeObj.FromName = "My Name"
aeObj.AddTo "[email protected]", "My friend Denise"
aeObj.Subject = "Sample 02 - second email"
aeObj.Body = "Hello my friend," & vbCrLf & "How are you doing?" & vbCrLf & "Regards."
aeObj.Send
Wscript.Echo "Result: " & aeObj.LastError


Download this snippet    Add to My Saved Code

Send an e-mail to a SMTP server without need for IIS/CDONT, in VBScript. Embed attachments, use RTF Comments

No comments have been posted about Send an e-mail to a SMTP server without need for IIS/CDONT, in VBScript. Embed attachments, use RTF. Why not be the first to post a comment about Send an e-mail to a SMTP server without need for IIS/CDONT, in VBScript. Embed attachments, use RTF.

Post your comment

Subject:
Message:
0/1000 characters