Changes

Activity:SendEmail (Activity)

3,317 bytes added, 07:40, 22 July 2013
Created page with "The SendEmail Activity sends an Email via SMTP, using a server it connects to. It also supports attachments, HTML bodies and Email templates. {{ActivityInfoBox | title = Send..."
The SendEmail Activity sends an Email via SMTP, using a server it connects to. It also supports attachments, HTML bodies and Email templates.

{{ActivityInfoBox
| title = Send Email
| name = SendEmail
| internalname = SendEmail
| image =
| imagecaption = Activity SendEmail
| purpose = Send an Email via SMTP
| category = ControlFlow
| returns = True if successful
| version = 2.1.15+
}}





==Arguments==

{| class="wikitable sortable" | width = "50%"
|-
! Arguments!! Type !! Direction !! Purpose
|- align="left"
| Attachments|| Collection<Attachement> || In || A list of attachments
|- align="left"
| Bcc|| String || In || A ';' separated list of blind copy recipients
|- align="left"
| Body|| String || In || The body text of the Email
|- align="left"
| BodyTemplateFilePath|| String || In || Path to the template to be used
|- align="left"
| Cc|| String || In || A ';' separated list of copy recipients
|- align="left"
| EnableSsl|| Boolean|| In || True if the SMTP server requires SSL encryption, false if not
|- align="left"
| From|| String|| In || The Email Address to send from
|- align="left"
| Host|| String || In || The name or the IP-Address of the SMTP server
|- align="left"
| Password|| String || In || The password used for authentication on the SMTP server
|- align="left"
| Port|| Integer|| In || The port to use for SMTP connection; default is 25
|- align="left"
| Result|| Boolean || Out || Returns True on success, false on error
|- align="left"
| Subject|| String || In || The subject of the Email
|- align="left"
| TestDropPath|| String || In || A path to write the Email to as a file, instead of sending it
|- align="left"
| TestMailTo|| String || In || A test recipient to send the Email to; will overrule the ''To'' argument if set
|- align="left"
| To|| String || In || A ';' separated list of recipients
|- align="left"
| Tokens|| Dictionary<string, string> || In || A list of keywords and replacements when using templates
|- align="left"
| UseHTML|| Boolean || In || True to create the Email in HTML format, false to use plain text
|- align="left"
| Password|| String || In || The user name used for authentication on the SMTP server
|}

==Usage==

This activity is typically used to send Emails during the execution of a workflow. Sending is always asynchronous, so this activity will not block the execution of the workflow.


==Example==

Send an EMail with the number of MetaClasses that derive (direct and indirect) from the MetaClass of a given object. Use a (fictional) Gmail account.


{| class="wikitable" | width = "50%"
|-
! Argument !! Value !!
|- align="left"
| Body|| "With kind regards from your Workflow!"
|- align="left"
| Cc|| <source lang = "vbnet">"TESTCC <testcc@augmensys.com"</source>
|- align="left"
| EnableSsl|| True
|- align="left"
| From|| <source lang = "vbnet">"UBIK Workflow <ubikworkflow@gmail.com"</source>
|- align="left"
| Host|| smtp.gmail.com
|- align="left"
| Password|| pAsSwOrD
|- align="left"
| Port|| 587
|- align="left"
| Subject|| <source lang = "vbnet">"Derivates of " + UBIKObject.Name + ": " + UBIKObject.MetaClass.AllDerivates.Count.ToString()"</source>
|- align="left"
| To|| <source lang = "vbnet">"John Doe <john.doe@augmensys.com"</source>
|- align="left"
| UseHTML|| True
|}

==Additional information==

[[Category:Workflows]]