Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Not applicable

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

Hi ,

I am getting error "The message could not be sent to the SMTP server.

The transport error code was 0x80040217. The server response was not

available " on code line objMsg.Send

Please help me

thanks,

Kapil

Sub SendGMail1()

' 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")

= "kapil_dadheech@gmail.com"

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

= "kapil1"

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

= 1

msgConf.Fields.Update

' Email

objMsg.To = "kapil_dadheech@gmail.com"

objMsg.From = "kapil_dadheech@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

4 Replies
Highlighted
MVP & Luminary
MVP & Luminary

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

Hi kapil,

For sending you need SMTP server in your network, without that I think it is not possible to send email.

Regards,

Jagan.

Highlighted
Not applicable

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

please check the code I am trying to send from Gmail account not from any other domain

Highlighted
MVP & Luminary
MVP & Luminary

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

Hi Kapil,

Try changing the port number to 587.


Regards,

Jagan.

Highlighted
Not applicable

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

already tested with 25,465,587,