Emailing Reports
There are two ways to send emails and attached Reports in Sharperlight. One method is to use the email account inside Sharperlight in combination with Query Expressions that send emails. The second method is to use Sharperlight command lines, sendEmail and Windows Task Scheduler. This second method does offer more control over the whole process and is covered by a Video at the very bottom of this article
Emailing using Expressions
Embed reports in Emails by placing an Output Expression using EmailReport or Email functions.
The example shows the emailing of an Employee Contact List from both Excel and the Browser using Publisher and the Sharperlight Web Channel
Below is the Expression used to send an Email with the Report embedded
EmailReport(
IIF( Upper(Left(This%20e-mail%20address%20is%20being%20protected%20from%20spambots,%20you%20need%20JavaScript%20enabled%20to%20view%20it%20“>{@staging-sharperlight-com.stackstaging.comSendEmail},1))=”Y”,” fromMe@staging-sharperlight-com.stackstaging.comgmail.com“,””),
{@staging-sharperlight-com.stackstaging.comEmailTo},
“Employee Contact List”,
“Please find attached the latest Employee Contact List”)
Download Email Sample Workbook
Download Link Query Builder – Emailing Reports
Sending a Email with Multiple Reports

Email( “from@staging-sharperlight-com.stackstaging.comyourcompany.com” , “to@staging-sharperlight-com.stackstaging.comhotmail.com“, “cc@staging-sharperlight-com.stackstaging.comhotmail.com“,
“Subject goes here”,
“Test multiple sections in email from company “ + {%Name}
+ ChCRLF()+ ChCRLF()
+ UrlContentGet(“{_System.Rest.URL}TableBasic/?query=Test.EmailMulSub“
+ “{_System.Rest.Usid}”
+ “&fltGroup=” + UrlEncode(“A“) + “&fltGroup_2=” + UrlEncode(“P“)
)
+ ChCRLF()+ ChCRLF()
+ UrlContentGet(“{_System.Rest.URL}TableBasic/?query=Test.EmailMulSub“
+ “{_System.Rest.Usid}”
+ “&fltGroup=” + UrlEncode(“P“) + “&fltGroup_2=” + UrlEncode(“zzz“)
)
+ ChCRLF()+ ChCRLF()
, 0,true
)

Emailing using Command Lines and Task Schduler
