Method: CreateEMail for EMailService
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: CreateEMail for EMailService
Method: CreateEMail for EMailService
Creates an EMail object containing an email to send over an email server. Use the Send method to send emails. Separate several email addresses with commas. If you want to include the name in the email address, enter the actual email address between < and > characters.
Set oEMail = Object.CreateEMail(From, To, Subject, TextBody)
Object | EMailService Object with this method |
From | String Specifies the email address or name of the sender. |
To | String Specifies the email address of the recipient. |
Subject | String Specifies the subject of the email. |
TextBody | String Specifies the text of the email. The text can contain text but not formats. |
oEMail | EMail Returned object |
The following example creates an email and sends it without authentication.
VBScript | Python |
Dim oMyEMailService, oMyMail Set oMyEMailService = CreateEMailService("server.example.com") Set oMyMail = oMyEMailService.CreateEMail("FromUser <from.example@example.com>", "ToUser <to.example@example.com>", "This is the subject", "This is some text") Call oMyMail.Send