Email Actions
  • 02 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Email Actions

  • Dark
    Light

Article summary

Email Actions

sendEmail

Send an Email message.

Property

Value

Description

smtpServer*

text, expression, variable

SMTP server host name or address

smtpPort

expression, variable

SMTP server host port (default: 25)

encryption

choice (STARTTLS, SSL), text, expression, variable

SMTP Encryption method (default: none)

user

text, expression, variable

SMTP server username (default: none)

password

password, string, expression, variable

SMTP server password (default: none)

from*

text, expression, variable

the sender email address

to*

text, expression, variable

the recipient email address(es) (comma separated)

cc

text, expression, variable

the CC recipient email address(es) (comma separated)

bcc

text, expression, variable

the BCC email address(es) (comma separated)

subject*

text, expression, variable

the email subject

isHtml

boolean, expression, variable

html message flag (default: false)

message*

text, expression, variable

the email message

attachment

text, expression, variable

filename or array of filenames to attach

customProperties

expression, variable

Record or object containing JavaMail custom properties (default: none)

returnVariable

expression, variable

name of the variable to be assigned to the return value

Global.emailHost = "smtp.gmail.com"
Global.emailUser = "jdoe@gmail.com"
Global.emailPwd = <Password>
#send plain text email with attached file
mailSent = sendEmail(Global.emailHost, 587, "STARTTLS",
Global.emailUser,<Password>,
Global.emailUser, Global.emailUser, "test with attachment",
"see attached photo", ["/photos/test.jpg"])
#send html text with embedded image
mailSent = sendEmail(Global.emailHost, 465, "SSL",
Global.emailUser,<Password>,
Global.emailUser, Global.emailUser, "test with html embedded attachment",
true,
"<html>\n<head />\n<body>\Here it is: <img src=\"cid:attachment1\"
name=\"test.jpg\" />\n</body>\n</html>", ["/photos/test.jpg"])

sendEmailWithDefaults

Send an email message using default connection values from RapidIdentity.

Property

Value

Description

Assign to

expression, variable

name of the variable to be assigned to the return value

to*

text, expression, variable

the recipient email address(es) (comma separated)

cc

text, expression, variable

the CC recipient email address(es) (comma separated)

bcc

text, expression, variable

the BCC email address(es) (comma separated)

subject*

text, expression, variable

the email subject

isHtml

boolean, expression, variable

html message flag (default: false)

message*

text, expression, variable

the email message

attachment

text, expression, variable

filename or array of filenames to attach

customProperties

expression, variable

Record or object containing JavaMail custom properties (default: none)

sendEmailWithDefault("myemail@example.net", "This is a test report", "This is a test message", false, {"smtp.headers": {"Importance": "low"}}}

Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence