Jump to: navigation, search

Difference between revisions of "Activity:SendEmail (Activity)"


(Additional information)
(Example)
 
(19 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
| internalname = SendEmail
+
| image = [[File:UI_Activity_SendEmail.png|220px]]
| image =
+
| imagecaption = SendEmail (Expanded)
| imagecaption = Activity SendEmail
+
 
| 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  
 
! Argument!! Type !! Direction !! Purpose  
 
|- align="left"
 
|- align="left"
| Attachments|| Collection<Attachement> || In || A list of attachments
+
| Attachments|| Collection<Attachment> || In || A list of attachments
 
|- align="left"
 
|- align="left"
| Bcc|| String || In || A ';' separated list of blind copy recipients
+
| Bcc|| {{String_MSDN}} || In || A ';' separated list of blind copy recipients
 
|- align="left"
 
|- align="left"
| Body|| String || In || The body text of the Email
+
| Body|| {{String_MSDN}}|| In || The body text of the Email
 
|- align="left"
 
|- align="left"
| BodyTemplateFilePath|| String || In || Path to the template to be used
+
| BodyTemplateFilePath|| {{String_MSDN}}|| In || Path to the template to be used; backslashes must be escaped
 
|- align="left"
 
|- align="left"
| Cc|| String || In || A ';' separated list of copy recipients
+
| Cc|| {{String_MSDN}}|| In || A ';' separated list of copy recipients
 
|- align="left"
 
|- align="left"
| EnableSsl|| Boolean|| In || True if the SMTP server requires SSL encryption, false if not
+
| EnableSsl|| {{Boolean_MSDN}}|| In || True if the SMTP server requires SSL encryption, false if not
 
|- align="left"
 
|- align="left"
| From|| String|| In || The Email Address to send from
+
| From|| {{String_MSDN}}|| In || The Email Address to send from
 
|- align="left"
 
|- align="left"
| Host|| String || In || The name or the IP-Address of the SMTP server
+
| Host|| {{String_MSDN}}|| In || The name or the IP-Address of the SMTP server
 
|- align="left"
 
|- align="left"
| Password|| String || In || The password used for authentication on the SMTP server
+
| Password|| {{String_MSDN}}|| In || The password used for authentication on the SMTP server
 
|- align="left"
 
|- align="left"
| Port|| Integer|| In || The port to use for SMTP connection; default is 25
+
| Port|| {{Int32_MSDN}}|| In || The port to use for SMTP connection; default is 25
 
|- align="left"
 
|- align="left"
| Result|| Boolean || Out || Returns True on success, false on error
+
| Result|| {{Boolean_MSDN}}|| Out || Returns True on success, false on error
 
|- align="left"
 
|- align="left"
| Subject|| String || In || The subject of the Email
+
| Subject|| {{String_MSDN}}|| In || The subject of the Email
 
|- align="left"
 
|- align="left"
| TestDropPath|| String || In || A path to write the Email to as a file, instead of sending it
+
| 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|| String || In || A test recipient to send the Email to; will overrule the ''To'' argument if set
+
| TestMailTo|| {{String_MSDN}}|| In || A test recipient to send the Email to; will overrule the ''To'' argument if set
 
|- align="left"
 
|- align="left"
| To|| String || In || A ';' separated list of recipients
+
| To|| {{String_MSDN}}|| In || A ';' separated list of recipients
 
|- align="left"
 
|- align="left"
| Tokens|| Dictionary<string, string> || In || A list of keywords and replacements when using templates
+
| Tokens|| Dictionary<{{String_MSDN}}, {{String_MSDN}}> || In || A list of keywords and replacements when using templates
 
|- align="left"
 
|- align="left"
| UseHTML|| Boolean || In || True to create the Email in HTML format, false to use plain text
+
| UseHTML|| {{Boolean_MSDN}} || In || True to create the Email in HTML format, false to use plain text
 
|- align="left"
 
|- align="left"
| Password|| String || In || The user name used for authentication on the SMTP server
+
| Password|| {{String_MSDN}}|| In || The user name used for authentication on the SMTP server
 
|}
 
|}
  
==Usage==
+
[[Category:Activities|SendEmail (Activity)]]
 +
 
 +
===Usage===
  
 
This activity is typically used to send Emails during the execution of a workflow.  
 
This activity is typically used to send Emails during the execution of a workflow.  
Line 66: Line 63:
 
{{Hint|Sending is always asynchronous, so this activity will not block the execution of the workflow}}
 
{{Hint|Sending is always asynchronous, so this activity will not block the execution of the workflow}}
  
==Example==
+
=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"
 +
| -or-||
 +
|- align="left"
 +
| BodyTemplateFilePath|| C:\\MyTemplates\\TemplateBody.txt
 
|- align="left"
 
|- align="left"
 
| Cc|| <source lang = "vbnet">"TESTCC <testcc@augmensys.com>; whobert@augmensys.com"</source>  
 
| Cc|| <source lang = "vbnet">"TESTCC <testcc@augmensys.com>; whobert@augmensys.com"</source>  
Line 89: Line 91:
 
| Port|| 587
 
| Port|| 587
 
|- align="left"
 
|- align="left"
| Subject|| <source lang = "vbnet">"Derivates of " + UBIKObject.Name + ": " + UBIKObject.MetaClass.AllDerivates.Count.ToString()"</source>  
+
| 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 96: 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==
 
==See also==
 
* [[Workflow Designer]]
 
* [[Workflow Designer]]
  
[[Category:Workflows]]
+
[[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.

[edit]

Description

Send Email
Name SendEmail
Purpose Send an Email via SMTP
Category ControlFlow
Returns True if successful
Version 2.1.15+

Arguments

Argument Type Direction Purpose
Attachments Collection<Attachment> In A list of attachments
Bcc String In A ';' separated list of blind copy recipients
Body String In The body text of the Email
BodyTemplateFilePath String In Path to the template to be used; backslashes must be escaped
Cc String In A ';' separated list of copy recipients
EnableSsl Boolean In True if the SMTP server requires SSL encryption, false if not
From String In The Email Address to send from
Host String In The name or the IP-Address of the SMTP server
Password String In The password used for authentication on the SMTP server
Port Integer In The port to use for SMTP connection; default is 25
Result Boolean Out Returns True on success, false on error
Subject String In The subject of the Email
TestDropPath String In A path to write the Email to as a file, instead of sending it; backslashes must be escaped
TestMailTo String In A test recipient to send the Email to; will overrule the To argument if set
To String In A ';' separated list of recipients
Tokens Dictionary<String, String> In A list of keywords and replacements when using templates
UseHTML Boolean In True to create the Email in HTML format, false to use plain text
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.

IC Hint square.pngSending 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.

SendEmail used in the larger example "Export and send MetaClasses"
SendEmail used in the larger example "Export and send MetaClasses"
Argument Value
Attachments
New System.Collections.ObjectModel.Collection(Of System.Net.Mail.Attachment) From {new System.Net.Mail.Attachment(fileName)}
Body With kind regards from your Workflow!
-or-
BodyTemplateFilePath C:\\MyTemplates\\TemplateBody.txt
Cc
"TESTCC <testcc@augmensys.com>; whobert@augmensys.com"
EnableSsl True
From
"UBIK Workflow <ubikworkflow@gmail.com>"
Host smtp.gmail.com
Password pAsSwOrD
Port 587
Subject
"Derivates of " + UBIKObject.Name + ": " + UBIKObject.MetaClass.AllDerivates.Count.ToString()
To
"John Doe <john.doe@augmensys.com"
UseHTML True
User ubikworkflow@gmail.com
Tokens
new System.Collections.Generic.Dictionary(Of String, String) From {{"?NAME?", "Joe"},{"?SENDER?","Doe"}}


See also