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: 
eliran
Creator III
Creator III

Failure in sending mail through Qlikview

Hi all,

I know it's been discussed few times but I can't figure out why I fail to send mail through Qlikview.

I stripped the code down to just necessary lines and the macro editor jumps when the send command is executed, thus failing to send the mail.

function sendme()

set objMessage = CreateObject("CDO.Message")

objMessage.Subject = "Subject"

objMessage.From = "eliran@gmail.com"

objMessage.To="xxxx@gmail.com"

objMessage.TextBody="testing Body"

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587

objMessage.Configuration.Fields.Update

objMessage.Send

end function

Thanks for any help,

Eliran.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Eliran,

Gmail needs to specify SSL, give a try to the code in this post.

Hope this helps.

View solution in original post

7 Replies
Miguel_Angel_Baeyens

Hello Eliran,

Gmail needs to specify SSL, give a try to the code in this post.

Hope this helps.

eliran
Creator III
Creator III
Author

Hi Miguel,

I'm afraid the same thing happens when I try your code, the code ObMsg.Send is highlighted and the macro is failing.

Am I missing something else?

Regards,

Eliran.

Miguel_Angel_Baeyens

Hi,

Does your computer have some firewall, antivirus software that is avoiding qv.exe from sending emails? The code itself works using your own username and password. If it doesn't I'd think of:

1.- Macro permissions: Go to the macro editor, and Allow System Access

2.- External software preventing QlikView sending emails.

Hope that helps.

eliran
Creator III
Creator III
Author

Thanks Miguel,

My firewall blocked it.

Regards,

Eliran.

Not applicable

Hi Miguel, can you re-post your code? I can't open the link.

Thank you very much.

Roby

Miguel_Angel_Baeyens

Hi Roby,

Check this post. I'll change the post above that points to the old QlikCommunity files.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable

Thank you very much !

Roby