Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

Using Email Notification Connector

So I got through the first part of setting up the connector and sending a test email. 

Now I want to add to my load script the code needed to shoot off an email to me if the task is not successful. 

I have the sample code that is not specific to any event.  This came from the YouTube video. 

LIB CONNECT TO 'Send Email Alerts';

LET vMsg = 'Sent at ' & Now();

RestConnectorMasterTable:

SQL SELECT

"status",

"result",

"filesattached"

FROM CSV (header on, delimiter ",", quote """") "CSV_source"

WITH CONNECTION(

     QUERY "to" "mritter@dunbararmored.com"

     ,QUERY "cc" "mritter@dunbararmored.com"

     ,QUERY "subject" "$(vMsg)"

     ,QUERY "message" "Yippie"

     ,QUERY "fromName" "noreply"

     ,QUERY "fromEmail" "Qlik@dunbarmored.com"

     ,QUERY "forate" "csv"

     );

[CSV_source]:

LOAD [status] AS [status],

[result] AS [result],

[filesattached] AS [filesattached]

RESIDENT RestConnectorMasterTable;

DROP TABLE RestConnectorMasterTable;

I suspect that I can use the above code but need to put a loop or something in and also check for an error level.  But I am not sure what to do next.

6 Replies
dwforest
Specialist II
Specialist II

rittermd
Master
Master
Author

Thanks.  Do you need to do anything other than create the xml file under the service you want to monitor?  Obviously you need to modify the domain and email addresses.  But anything else?

dwforest
Specialist II
Specialist II

You'd have to make sure you have an SMTP server and appropriate credentials and the smtp port is not blocked, but no other set up in Qlik is needed

rittermd
Master
Master
Author

I already went through all of the SMTP stuff and that seems to be working.

If I want to be notified anytime a task has an error where do I need to put this xml file?

Ipsita
Partner - Contributor
Partner - Contributor

Hi,

Can you please help me to understand how you have done the first part of setting up the connector and sending a test email.

What all configurations needed and the steps you performed to send alert emails on any task failure.

Regards,

Ipsita

saikripa
Contributor III
Contributor III

Hello , 

How can add multiple email IDs in CC ?