Difference between revisions of "Activity:SendEmail (Activity)"
(→Example) |
(→Example) |
||
(25 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The SendEmail Activity sends an Email via SMTP, using a server it connects to. It also supports attachments, HTML bodies and Email templates. | The SendEmail Activity sends an Email via SMTP, using a server it connects to. It also supports attachments, HTML bodies and Email templates. | ||
+ | = Description = | ||
{{ActivityInfoBox | {{ActivityInfoBox | ||
| title = Send Email | | title = Send Email | ||
| name = SendEmail | | name = SendEmail | ||
− | | | + | | image = [[File:UI_Activity_SendEmail.png|220px]] |
− | | | + | | imagecaption = SendEmail (Expanded) |
− | | imagecaption = | + | |
| purpose = Send an Email via SMTP | | purpose = Send an Email via SMTP | ||
| category = ControlFlow | | category = ControlFlow | ||
Line 13: | Line 13: | ||
}} | }} | ||
− | + | ===Arguments=== | |
− | + | ||
− | + | ||
− | + | ||
− | ==Arguments== | + | |
− | + | ||
{| class="wikitable sortable" | width = "50%" | {| class="wikitable sortable" | width = "50%" | ||
|- | |- | ||
− | ! | + | ! Argument!! Type !! Direction !! Purpose |
|- align="left" | |- align="left" | ||
− | | Attachments|| Collection< | + | | Attachments|| Collection<Attachment> || In || A list of attachments |
|- align="left" | |- align="left" | ||
− | | Bcc|| | + | | Bcc|| {{String_MSDN}} || In || A ';' separated list of blind copy recipients |
|- align="left" | |- align="left" | ||
− | | Body|| | + | | Body|| {{String_MSDN}}|| In || The body text of the Email |
|- align="left" | |- align="left" | ||
− | | BodyTemplateFilePath|| | + | | BodyTemplateFilePath|| {{String_MSDN}}|| In || Path to the template to be used; backslashes must be escaped |
|- align="left" | |- align="left" | ||
− | | Cc|| | + | | Cc|| {{String_MSDN}}|| In || A ';' separated list of copy recipients |
|- align="left" | |- align="left" | ||
− | | EnableSsl|| | + | | EnableSsl|| {{Boolean_MSDN}}|| In || True if the SMTP server requires SSL encryption, false if not |
|- align="left" | |- align="left" | ||
− | | From|| | + | | From|| {{String_MSDN}}|| In || The Email Address to send from |
|- align="left" | |- align="left" | ||
− | | Host|| | + | | Host|| {{String_MSDN}}|| In || The name or the IP-Address of the SMTP server |
|- align="left" | |- align="left" | ||
− | | Password|| | + | | Password|| {{String_MSDN}}|| In || The password used for authentication on the SMTP server |
|- align="left" | |- align="left" | ||
− | | Port|| | + | | Port|| {{Int32_MSDN}}|| In || The port to use for SMTP connection; default is 25 |
|- align="left" | |- align="left" | ||
− | | Result|| | + | | Result|| {{Boolean_MSDN}}|| Out || Returns True on success, false on error |
|- align="left" | |- align="left" | ||
− | | Subject|| | + | | Subject|| {{String_MSDN}}|| In || The subject of the Email |
|- align="left" | |- align="left" | ||
− | | TestDropPath|| | + | | TestDropPath|| {{String_MSDN}}|| In || A path to write the Email to as a file, instead of sending it; backslashes must be escaped |
|- align="left" | |- align="left" | ||
− | | TestMailTo|| | + | | TestMailTo|| {{String_MSDN}}|| In || A test recipient to send the Email to; will overrule the ''To'' argument if set |
|- align="left" | |- align="left" | ||
− | | To|| | + | | To|| {{String_MSDN}}|| In || A ';' separated list of recipients |
|- align="left" | |- align="left" | ||
− | | Tokens|| Dictionary< | + | | Tokens|| Dictionary<{{String_MSDN}}, {{String_MSDN}}> || In || A list of keywords and replacements when using templates |
|- align="left" | |- align="left" | ||
− | | UseHTML|| | + | | UseHTML|| {{Boolean_MSDN}} || In || True to create the Email in HTML format, false to use plain text |
|- align="left" | |- align="left" | ||
− | | Password|| | + | | Password|| {{String_MSDN}}|| In || The user name used for authentication on the SMTP server |
|} | |} | ||
− | + | [[Category:Activities|SendEmail (Activity)]] | |
− | + | ===Usage=== | |
+ | This activity is typically used to send Emails during the execution of a workflow. | ||
− | + | {{Hint|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. | 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. | ||
− | + | [[File:UI_Activity_SendEmail_Example.png|thumb|220px|alt=SendEmail used in the larger example "Export and send MetaClasses"|SendEmail used in the larger example "Export and send MetaClasses"]] | |
{| class="wikitable" | width = "50%" | {| class="wikitable" | width = "50%" | ||
|- | |- | ||
! Argument !! Value !! | ! Argument !! Value !! | ||
+ | |- align="left" | ||
+ | | Attachments|| <source lang = "vbnet">New System.Collections.ObjectModel.Collection(Of System.Net.Mail.Attachment) From {new System.Net.Mail.Attachment(fileName)}</source> | ||
|- align="left" | |- align="left" | ||
| Body|| With kind regards from your Workflow! | | Body|| With kind regards from your Workflow! | ||
|- align="left" | |- align="left" | ||
− | | Cc|| <source lang = "vbnet">"TESTCC <testcc@augmensys.com"</source> | + | | -or-|| |
+ | |- align="left" | ||
+ | | BodyTemplateFilePath|| C:\\MyTemplates\\TemplateBody.txt | ||
+ | |- align="left" | ||
+ | | Cc|| <source lang = "vbnet">"TESTCC <testcc@augmensys.com>; whobert@augmensys.com"</source> | ||
|- align="left" | |- align="left" | ||
| EnableSsl|| True | | EnableSsl|| True | ||
|- align="left" | |- align="left" | ||
− | | From|| <source lang = "vbnet">"UBIK Workflow <ubikworkflow@gmail.com"</source> | + | | From|| <source lang = "vbnet">"UBIK Workflow <ubikworkflow@gmail.com>"</source> |
|- align="left" | |- align="left" | ||
| Host|| smtp.gmail.com | | Host|| smtp.gmail.com | ||
Line 88: | Line 91: | ||
| Port|| 587 | | Port|| 587 | ||
|- align="left" | |- align="left" | ||
− | | Subject|| <source lang = "vbnet">"Derivates of " + UBIKObject.Name + ": " + UBIKObject.MetaClass.AllDerivates.Count.ToString() | + | | Subject|| <source lang = "vbnet">"Derivates of " + UBIKObject.Name + ": " + UBIKObject.MetaClass.AllDerivates.Count.ToString()</source> |
|- align="left" | |- align="left" | ||
| To|| <source lang = "vbnet">"John Doe <john.doe@augmensys.com"</source> | | To|| <source lang = "vbnet">"John Doe <john.doe@augmensys.com"</source> | ||
Line 95: | Line 98: | ||
|- align="left" | |- align="left" | ||
| User|| ubikworkflow@gmail.com | | User|| ubikworkflow@gmail.com | ||
+ | |- align="left" | ||
+ | | Tokens||<source lang = "vbnet">new System.Collections.Generic.Dictionary(Of String, String) From {{"?NAME?", "Joe"},{"?SENDER?","Doe"}}</source> | ||
|} | |} | ||
− | == | + | {{Activity/End}} |
+ | |||
+ | ==See also== | ||
+ | * [[Workflow Designer]] | ||
− | [[Category: | + | [[Category:Activities|SendEmail (Activity)]] |
Latest revision as of 13:40, 15 February 2018
The SendEmail Activity sends an Email via SMTP, using a server it connects to. It also supports attachments, HTML bodies and Email templates.