SendMail: Send eMail from target platform (O365 or Notes Domino)
Tag: SendMail
The SendMail function automates the action of sending an email from the session's signed-in user account running the automation.
When executed with a sapio365 RBAC role, the email will be sent from the signed-in user's mailbox.
Does not work in Ultra Admin mode in sapio365 because there is no signed-in user. Ultra Admin mode is no longer available in the current version of sapio365.
The SendMail action is only available through automation. It has no equivalent feature in the sapio365 user interface.
<SendMail/>
Tag Attributes
Attributes | Attribute Value | Value Description |
---|---|---|
SendTo | "To" recipients addresses (mandatory) use a comma separator to enter several addresses | N/A |
SendFrom | to specify the sender username or id | Only valid if current session is App |
Subject | Email subject (mandatory) | N/A |
SaveToSentItems | TRUE (stores the message in Outlook's "sent items") / FALSE - defaults to FALSE | N/A |
ZipName | Name of zip file containing all attachments | N/A |
CopyTo | N/A | "CC" carbon copy addresses. Use a comma separator to enter several addresses - Optional |
BlindCopyTo | N/A | "BCC" blind carbon copy addresses. Use a comma separator to enter several addresses - Optional |
Remark | N/A | Any text you want at the beginning of the body field of the memo - Optional |
Flags | N/A | Keyword. One or more flags indicating the priority and security of the memo. If you specify multiple flags, format them as a list, as in [SIGN]:[PRIORITYHIGH]:[RETURNRECEIPT]. Enclose each flag in square brackets, as shown - Optional |
Sub actions
Sub actions | |
---|---|
Body | Email text (mandatory) can be plain text or HTML. To use HTML formatting, encapsulate the body in a <![CDATA[...]]> item |
Attachment | Creates an attachment for the message (use as many as you wish). NB: the current Graph API limitation is 4 Mb for all attachments (attaching more will end in error). Attributes: |
Example Scripts
1) Sample with plain text
<ytriaAutomation Application="sapio365" Console="False">
<SendMail sendto="alexw@M365x393550.onmicrosoft.com" subject="Evaluate this admin tool" SaveToSentItems="true">
<Body>
Click here to learn more.
Ask for a free trial.
Install & go!
</Body>
<Attachment FilePath="C:\Users\sonia\Documents\Delete\sapio365_vs_Microsoft_native_tools.pdf"/>
</SendMail>
</ytriaAutomation>
2) Sample with HTML formatting and attachment
<ytriaAutomation Application="sapio365" Console="False">
<SendMail sendto="alexw@M365x393550.onmicrosoft.com" subject="Evaluate this admin tool">
<Body>
<![CDATA[
<a href=http://www.ytria.com/sapio365>Click here</a> to learn more about sapio365.<br>
<b>Ask for a free trial.</b><br>
<i>Install & go!</i><p>
]]>
</Body>
<Attachment FilePath="C:\Users\sonia\Documents\Delete\sapio365_vs_Microsoft_native_tools.pdf"/>
</SendMail>
</ytriaAutomation>
3) Sample which zips up files and sends as attachment
This HTML email bundles two files and sends the resulting zip attachment (see image that follows). Note that one of the files is a zip file.
ytriaAutomation Application="sapio365" Console="False">
<SendMail sendto="alexw@M365x393550.onmicrosoft.com" subject="Evaluate this admin tool" zipName="bundle">
<Body>
<![CDATA[
<a href=http://www.ytria.com/sapio365>Click here</a> to learn more about sapio365.<br>
<b>Ask for a free trial.</b><br>
<i>Install & go!</i><p>
]]>
</Body>
<Attachment FilePath="C:\Users\sonia\Documents\Delete\Final_job.zip" zip="true"/>
<Attachment FilePath="C:\Users\sonia\Documents\Delete\sapio365_vs_Microsoft_native_tools.pdf"/>
</SendMail>
</ytriaAutomation>