Methods
AddAttachment | Add an attachment. |
ClearAttachments | Remove all attachments from current object. |
AddHeader | Add customized header. |
ClearHeaders | Clear all headers added by AddHeader method. |
Send | Send email. |
GetGMTTime | Get GMT time in string format. |
Properties
Subject | Get/Set email subject. |
Charset | Get/Set charset. |
From | Get/Set sender. |
To | Get/Set recipients. |
CC | Get/Set carbon copy recipients. |
Bcc | Get/Set blind carbon copy recipients. |
TextBody | Get/Set text/plain body. |
HtmlBody | Get/Set text/html body. |
Content | Get encoded content of current email. |
Priority | Set/Get priority of current email. |
Remarks
SmtpMail object can be used to compose and send email with EmailArchitect Server.
Usage Example
Dim server, user, password, requestAddr server = "localhost" user = "hunter@emailarchitect.net" password = "mypassword" requestAddr = "192.168.0.1" Dim oSvr Set oSvr = CreateObject("EmailArchitectObjects.ServerRoot") r = oSvr.Connect( server, user, password, 0, requestAddr ) If r <> 0 Then WScript.Echo( "connect server failed!" ) WScript.Quit End If Dim oDomains, oDomain Set oDomains = oSvr.DomainCollection Set oDomain = oDomains.Items(CStr(oSvr.Domain)) Dim oUsers, oUser Set oUsers = oDomain.UserCollection Set oUser = oUsers.Items(CStr(oSvr.User)) Dim oSmtp Set oSmtp = oUser.NewSmtpMail oSmtp.Charset = "iso-8859-1" oSmtp.From = user oSmtp.Subject = "test" oSmtp.TextBody = "this is a test from emailarchitectobjects" oSmtp.To = "dennis<dennis@emailarchitect.net>, test@emailarchitect.com" oSmtp.CC = "cc@mydomain.com" r = oSmtp.Send( 0, 0 ) If r <> 0 Then WScript.Echo( "send email failed!" ) WScript.Quit End If