--- title: "Email Actions" slug: "email-actions" description: "This is a list of actions in RapidIdentity Connect that can be used with the email attribute." tags: ["RapidIdentity ", "Connect", "Actions", "Email"] updated: 2022-06-02T20:46:00Z published: 2022-06-02T20:46:00Z canonical: "help.rapididentity.com/email-actions" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt > Use this file to discover all available pages before exploring further. # Email Actions ## 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 | ```actionscript Global.emailHost = "smtp.gmail.com" Global.emailUser = "jdoe@gmail.com" Global.emailPwd = #send plain text email with attached file mailSent = sendEmail(Global.emailHost, 587, "STARTTLS", Global.emailUser,, 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,, Global.emailUser, Global.emailUser, "test with html embedded attachment", true, "\n\n\Here it is: \n\n", ["/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) | ```actionscript sendEmailWithDefault("myemail@example.net", "This is a test report", "This is a test message", false, {"smtp.headers": {"Importance": "low"}}} ```