SendEmail Script Examples

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search

This page contains script examples for the SendEmail script command.

The following example will send an e-mail message with two attachments to multiple recipients.

(SELECT 'EmailFrom', '') UNION ALL
(SELECT 'EmailTo', ',,') UNION ALL
(SELECT 'EmailSubject', 'Example E-mail') UNION ALL
(SELECT 'EmailBody', 'QPR ProcessAnalyzer example script started running.') UNION ALL
(SELECT ''EmailAttachmentQuery', 'SELECT * from #EmailAttachmentParameters') UNION ALL
(SELECT 'SmtpServer', 'localhost')

Where the #EmailAttachmentParameters table contains following data:

Name Content Media type Creation time
Example attachment picture Picture.jpg image/jpg 2016-04-22 12:00:00
Example attachment xml file Example.xml text/xml 2016-04-22 12:00:01