WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: jerwah on December 27, 2013, 06:48:32 AM

Title: Postie Extender, sending through Gmail?
Post by: jerwah on December 27, 2013, 06:48:32 AM
So, I am trying to send email through gmail/smtp. Gmail account is setup to support both POP and IMAP.
If I use default port, explicit port 25, port 587 or port 465/SSL I get :
530-5.5.1 Authentication Required

If I use port 465/TLS it just hangs at kSendText forever.

Any thoughts. I am 100% positive the username/password is correct.


        AddExtender("WWPST44I.DLL")
        msg="THIS IS A TEST"
strHost = 'smtp.gmail.com'
strTo = 'somebody@yahoo.com'
strFrom = 'me@gmail.com'
strSubject = 'Flash Card Results'
strBody = StrCat( '<HTML><HEADER></HEADER><BODY>', msg, '</BODY></HTML>'  )
strUser = 'me@gmail.com'
strPassword = 'mypassword'
nPort = "465"
attachments=''
flags = "h"
kInit( strhost, strfrom, strUser, strPassword, nPort, "TLS" )
kDest(strto,"","")
ret = kSendText(strsubject,msg,attachments,flags)
If ret == 0
    errline=kStatusInfo()
   Message("ErrLine",errline)
EndIf
Title: Re: Postie Extender, sending through Gmail?
Post by: td on December 27, 2013, 08:48:46 AM
Gmail no longer supports port 465 with TLS.  You have to use either port 587 or port 25 with TLS.
Title: Re: Postie Extender, sending through Gmail?
Post by: jerwah on December 27, 2013, 02:38:00 PM
Thank you.  Sorry if it wasn't clear, when I use 587/TLS or 25/TLS I am getting :

Could not send:  error= -1
Status: 530-5.5.1 Authentication Required. Learn more at

But I am 100% certain that the username/password is correct.  (Confirmed via login to gmail using copy/paste)
Title: Re: Postie Extender, sending through Gmail?
Post by: jerwah on December 27, 2013, 05:18:43 PM
FYI I found some code in another thread that used .net calls which I was able to get working, in lieu of postie, so I'm all set for what I was trying to accomplish, but still think there might be an issue with the postie extender, would be happy to continue troubleshooting.
Title: Re: Postie Extender, sending through Gmail?
Post by: td on December 27, 2013, 11:24:37 PM
The postie extender does not have an 'issue' with gmail using tls and ports 25 or 587.  Gmail is used as one of the SMTP servers in the extender's regression test.  However, you do need to specify the 'e' flag with the kSendText function to indicate that you want to use Extended SMTP.  I should have mentioned that in my original post.