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: 
keerthika
Creator II
Creator II

Email send issue

Hi All,

Can you pls give some idea to fix this

Error: The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available

My Macro is

Sub SendGMail()

' Object creation

Set objMsg = CreateObject("CDO.Message")

Set msgConf = CreateObject("CDO.Configuration")

' Server Configuration

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

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

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

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "****@gmail.com"

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "*****"

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 443

msgConf.Fields.Update

' Email

objMsg.To = "****@gmail.com"

objMsg.From = "****@gmail.com"

objMsg.Subject = "Test send with Gmail account"

objMsg.HTMLBody = "HTML/Plain text message."

objMsg.Sender = "Mr. Name"

Set objMsg.Configuration = msgConf

' Send

objMsg.Send

' Clear

Set objMsg = nothing

Set msgConf = nothing

End Sub

Tnaks,

Keke

8 Replies
Miguel_Angel_Baeyens

Log in with that account in Google Mail, then go to https://myaccount.google.com/lesssecureapps and set Less Secure to "On".

keerthika
Creator II
Creator II
Author

Hi,

Error: The transport failed to connect to the server.

keerthika
Creator II
Creator II
Author

Hi,

Its already 'On' but its not working

Miguel_Angel_Baeyens

Does the account have two step verification enabled?

keerthika
Creator II
Creator II
Author

Sry, how to find that

andrey_krylov
Specialist
Specialist

Strangely enough. Try to check  login and password.