Cannot send mail using from ONLY one specific Google account


I am not able to send mail via for ONLY one specific Google account. When I use another Google account my VBS script sends mail successfully so I know the script is working correctly.

It looks like there is an issue with that particular account and I have already posted a request for support in the Gmail help forums.!topic/gmail/8XFKONFbDA8

My VBS Script:

Dim emailObj
Set emailObj = CreateObject("CDO.Message")

emailObj.From     = "******"
emailObj.To       = "******"

emailObj.Subject  = "Test Email"
emailObj.TextBody = "Testing Email Functionality"

Set emailConfig = emailObj.Configuration

emailConfig.Fields("")            = ""
emailConfig.Fields("")        = 465
emailConfig.Fields("")             = 2
emailConfig.Fields("")      = 1
emailConfig.Fields("") = 60
emailConfig.Fields("")            = true

'First Account
emailConfig.Fields("")          = "******"
emailConfig.Fields("")          = "************"

'Second Account
'emailConfig.Fields("")          = "******"
'emailConfig.Fields("")          = "************"


If err.number = 0 Then
    Msgbox "Done"
    Msgbox err
End If

Account 1 Test (Not Working)

Account 1

Account 2 Test (Working)

Account 2

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

Any help would be appreciated.

asked on Stack Overflow Dec 1, 2017 by XjSv • edited Dec 1, 2017 by XjSv

1 Answer


I had a same error. There is an option in Google account - I turned it On and it helped me.

answered on Stack Overflow Dec 28, 2017 by Alex Lomanovich

User contributions licensed under CC BY-SA 3.0