Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Email sending not working

Why this this function not working?

function sending()
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Subject"
objMessage.From = "test1@gmail.com"
objMessage.To = "test2@gmail.com"

objMessage.TextBody = "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/sendusername ") ="test1@gmail.com"

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword ") ="password"

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465

objMessage.Configuration.Fields.Update

objMessage.Send
end function

32 Replies
michaelfreitas
Creator
Creator

ctrl+M

it is like this?

config.jpg

Not applicable
Author

Yes

Anonymous
Not applicable
Author

https://www.google.com/settings/security/lesssecureapps

fixed it for me, apparently it was blocked by gmail, you would have to allow the less secure apps for it to work