Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

EMAIL NOTIFICATION in QEMC

Hi,

I need to send an email to the team once the task is finished in qemc saying that 'THE TASK IS FINISHED SUCCESFULLY'. I dont want any attachment to be sent along with this email.

Please help me out with this.

Thanks,

Siri.

7 Replies
marcohadiyanto
Partner - Specialist
Partner - Specialist

Hi Siria

you can check on qemc, tab system, setup, qlikview server, alert and then add address there.

if the task success it wont send email, but if there's error it will send email. it make easier since you've been alert if the task goes wrong..

but you must setup mail server first on the same setup.

Regards,

Marco

Not applicable
Author

Hi Marco,

I just want to send only when the task is reloaded and successfull.

Not applicable
Author

Hi Siria,

you can write a macro to send the email and then assign the macro to onpostreload event.

you can use the below macro code.

sub SendMail
' Define the Variable for Receipients
Dim strMailTo
Dim strMailCC      
Dim strMailBcc


strMailTo = "youremailid@yourdomain.com"

strMailCC = "youremailid@yourdomain.com"

strMailBcc = "youremailid@yourdomain.com"

strMailSubj = "THE TASK IS FINISHED SUCCESSFULLY"

' Email section
Set objCDOMsg = CreateObject("CDO.Message")
objCDOMsg.MimeFormatted = True
objCDOMsg.To = strMailTo
objCDOMsg.Cc = strMailCC
objCDOMsg.Bcc = strMailBcc
objCDOMsg.From = "youremailid@yourdomain.com"
objCDOMsg.Subject = strMailSubj

strHTMLBody= "<html>THE TASK IS FINISHED SUCCESSFULLY </html>"
objCDOMsg.HTMLBody = strHTMLBody

objCDOMsg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOMsg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "your smtp server"
objCDOMsg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOMsg.Configuration.Fields.Update
objCDOMsg.Fields.Update
 
If not IsEmpty(objCDOMsg.To) or not isnull(objCDOMsg.To) then
  objCDOMsg.Send
end if
 
  Set objCDOMsg = Nothing

end sub

you can use this macro by specifying your email addresses and the smtp server.

What important here is you need to create a batch file to reload and you can schedule the batch file on QEMC.

Thanks & Best Regards,

Kuldeep Tak

Not applicable
Author

Hi Siri,

if you have Publisher in your QV configuration, you can do that using its functionality (in QMC create reload task; in 'Distribute' tab of task settings you can find 'Distribute to QlikView Server' area, where users that should access document can be selected. In 'Notify' tab check 'Send notification e-mail to recipients' and that is all. When reload finishes, users will get mail).

regards

Not applicable
Author

Hi Krunoslav,

according to your procedure as well as an e-mail is sent also the .qvw file will be distributed to the selected folder. Is there also a possibility to just reload and sent a notify e-mail after successful completion without distributing the .qvw file or sending the .qvw file along with the e-mail?

regards

Thomas

dirk_konings
Creator III
Creator III

You could add an external task whick is executed after successful reload of previous job.

Put a .cmd job in there which sends your email.

We use this : clemail.exe

in QMC : System / supporting tasks / external program

Dirk

Not applicable
Author

Thanks for your suggestion.

Did already read about the possibility of external program task and mail via bat, but I'm not yet into it. I will take a closer look at this - if there exists already a howto please let me know.

Thomas