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 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/>
XML

Tag Attributes

AttributesAttribute ValueValue Description Comment

SendTo

"To" recipients addresses (mandatory) use a
comma separator to enter several addresses
N/AN/A
SubjectEmail subject (mandatory)N/AN/A
SaveToSentItemsTRUE (stores the message in Outlook's "sent
items") / FALSE - defaults to FALSE
N/AN/A
ZipNameName of zip file containing all attachmentsN/AN/A

Sub actions

Sub actions
BodyEmail 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:
FilePath: path of file to attach to the message
Zip: TRUE/FALSE creates and attaches a zip file
        from FilePath

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>
XML

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>
XML

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>
XML


automation-send-mail