// Example of Using Embedded commands to
// Send by Office365 SMTP server (START-TLS), it requries Ent. pack license 
%%EmailEnable: True%%// Enable emailing
// It can now set to launch Browser (Edge/Chrome) using the specific profile
// Users can set EmailBrowserProfileEmail to the email address of the Browser profile.
// The email address of a Browser profile usually means the email address signing the Browser.
// For example, in Edge, it is the email signing in Microsoft365. Or it is the Google account in Chrome.
%%EmailOAuth2Browser: 1%% // 1: Edge, 2: Chrome 
%%EmailBrowserProfileEmail: %%
// set the below setting to True, it will use the Browser profile with email addr as the EmailFrom
%%EmailBrowserProfileByFrom: True%%	

// For Office365, From address needs matching the account email or its aliases
// From, To, Cc addresses can be set directly or resolved from env variables
%%EmailFrom: %JOBFROMEMAIL% %%	
%%EmailTo: %JOBTO% %%
%%EmailCc: %%

%%EmailSubject: Sending by Office365 SMTP Server with XOAUTH2 Authentication%%

%%EmailContent: <html><head></head><body>
%%EmailContent: &The attached file is  %#FNAME#. <br/>%%
// reference image with cid: for embedding images in Emails
// need using EmailAttachImg to attach the image files
%%EmailContent: &inline image: <img src="cid:inline_demo1.png"width="300">%%

%%EmailContent: &<br/><br/> Best regards<br/>%%
%%EmailContent: &</body></html>%%
// embed images into email
%%EmailAttachImg: inline_demo1.png<g:\temp\hello1.png>%%
// EmailSendMethod: 7 			// by Officce365 SMTP-STARTTLS BASIC  
// EmailSendMethod: 8 			// by Officce365 SMTP-STARTTLS XOAUTH2  
%%EmailSendMethod: 8%% 	
%%EmailSendAsHTML: True%%		// Send Email content in HTML

// set the SMTP username if it is different from From addr.
// From addr. and SMTPUsername usually are the same as the Office 365 account email
%%EmailSMTPUserName: %JOBFROMEMAIL% %% 
%%EmailSMTPPassword: %%	// Password is not necessary for XOAUTH2