SMTP (Next-Gen)
Send email with templates and attachments
Send email via SMTP (stdlib smtplib, pydantic-validated, returns a structured result).
smtp_ng_1.0.0.tgz
Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.
Configuration · 8 fields
- HOST
hosttext requiredSpecify the Hostname of the server to which you will connect and execute commands or python scripts.
- PORT
porttext requiredSpecify the Port number used for connecting to the server.
Default
25 - Default From
default_fromtextSpecify the default email address to be used for sending notifications, emails, etc.
- Username
usernametextSpecify the username to access the server to which you will connect and execute commands or python scripts.
- Password
passwordpasswordSpecify the password to access the server to which you will connect and execute commands or python scripts.
- Use TLS
useTLScheckboxSpecify the timeout value after which the connection to the server is dropped.
Default
false - Use SSL
useSSLcheckboxUse implicit TLS (SMTPS, typically port 465). Mutually exclusive with Use TLS (STARTTLS).
Default
false - Timeout
timeoutinteger requiredSpecify the Port number used for connecting to the server.
Default
10
Operations · 6
Send Email (Advanced) 6 params
send_email_newsend_email_newSend an email with Jinja and email template support
- Recipient Type
typeselect requiredChoose the type of recipient for the email that you want to send. You have the ability to interchangeably send emails in multiple formats by specifying a comma-separated list of email addresses or selecting FortiSOAR™ teams or users, or by reusing team or user information defined in previous playbook steps as Jinja statements. You can choose from the following options: Manual Input, User, or Team. If you choose Manual Input, then you can specify a comma-separated list of email addresses, including email addresses of non-FortiSOAR™ users in the To, CC, and BCC fields. You can also specify the…
Default
Manual InputOptions Manual InputUserTeamWhen Recipient Type is User
- To
tomultiselect required - CC
ccmultiselect - BCC
bccmultiselect
When Recipient Type is Team
- To
tomultiselect required - CC
ccmultiselect - BCC
bccmultiselect
When Recipient Type is Manual Input
- To
totext requiredComma separated list of email addresses, User IRIs or Team IRIs
- CC
cctextComma separated list of email addresses, User IRIs or Team IRIs
- BCC
bcctextComma separated list of email addresses, User IRIs or Team IRIs
- From
fromtextSpecify the email address from which you want to send the email.
- Body Type
body_typeselect requiredSelect the format in which you want to send the email. You can choose from the following options: Plain Text, Rich Text, or Email Template. If you choose Plain Text, then in the Content field, you can specify only plain text. If you choose Rich Text, then in the Content field, you can add formatted content, images, and even custom jinja expressions using Dynamic Values. If you choose Email Template, then the Email Template drop-down list is displayed, using which you can select the template that you want to use to send the email. An existing email template is passed as an input for the email…
Default
Plain TextOptions Plain TextRich TextEmail TemplateWhen Body Type is Plain Text
- Subject
subjecttext - Content
contenttextarea required
When Body Type is Rich Text
- Subject
subjecttext - Content
contentrichtext required
When Body Type is Email Template
- Email Template
email_templatesselect required
- Attachment File Path
file_pathtext(Optional) Specify the path of the file that you want to add as an attachment to the email you want to send. NOTE: Use this parameter if the file is present in your FortiSOAR system.
- Attachment Name
file_nametext(Optional) Specify the name that you want to give to the file when it is attached to the email you want to send.
- Attachment IRI List
iri_listtext(Optional) Specify an array or comma-separated list of record IRIs of attachments you want to add to the email you want to send. You can specify either a list of file IDs or attachment IRIs; not required if you have specified the attachment file name and file path.
Returnsstatusmessage_idfromsubjectrecipientsattachmentsaccepted_countSend Email 6 params
send_emailsend_emailSend Email
- To Recipients
to_recipientstextEmail IDs of the members to whom you want to send the email message from the Exchange account. You must add the email IDs in the CSV or list format. For example, abc@xyz.com, def@lmn.comImportant: You must specify email ID(s) in at least one of the following fields: TO Recipients, CC Recipients, or BCC Recipients.
- Cc Recipients
cc_recipientstextEmail IDs of the members to be added to the CC list of the email message that you want to send from the Exchange account. You must add the email IDs in the CSV or list format.
- Bcc Recipients
bcc_recipientstextEmail IDs of the members to be added to the BCC list of the email message that you want to send from the Exchange account. You must add the email IDs in the CSV or list format.
- Body
bodyrichtext(Optional) Message or content of the email that you want to send from the Exchange account.
- Subject
subjecttextSpecify the Subject to be added to the email you want to send.
- Attachment IRI List
iri_listtext(Optional) Specify an array or comma-separated list of record IRIs of attachments you want to add to the email you want to send. You can specify either a list of file IDs or attachment IRIs; not required if you have specified the attachment file name and file path.
Returnsstatusmessage_idfromsubjectrecipientsattachmentsaccepted_countSend Rich Text Email (Deprecated) 9 params
send_richtext_emailsend_richtext_emailSend Email With Rich Text Content (Deprecated)
- To
totext requiredSemicolon separated list of email addresses
- CC
cctextSemicolon separated list of email addresses
- BCC
bcctextSemicolon separated list of email addresses
- From
fromtext - Subject
subjecttext - Content
contentrichtext required - Attachment File Path
file_pathtextPath to the file to be added as attachment. Use this if the file is present on the system
- Attachment Name
file_nametextFile would be attached with this name to the email
- Attachment IRI List
iri_listtextRecord IRI of attachments to be added to the email. Could be either file or attachment IRI. Not required if File Path and Attachment Name are used instead
Returnsstatusmessage_idfromsubjectrecipientsattachmentsaccepted_countGet Users
get_usersget_usersGet available Users
No parameters.
Get Teams
get_teamsget_teamsGet available teams
No parameters.
Get Email Templates
get_email_templatesget_email_templatesGet available email templates
No parameters.