Page 1 of 1

Problem using PureSMTP library with Gmail

Posted: Fri Apr 24, 2009 12:55 pm
by NuclearFusion
Hi,
when I use this

Code: Select all

OpenConsole()
MySMTPServer.s = "smtp.gmail.com"
MySMTPPort.l = 465
rc.l = PureSMTP_OpenSMTPConnection(MySMTPServer, MySMTPPort)
Debug rc
the operation seems to hang. When I quit the Purebasic console I get a debug screen with code -3.
Any ideas why this doesn't work?
Thx.

Posted: Fri Apr 24, 2009 1:39 pm
by Progi1984
Gmail use SMTP on SSL so you can't use PureSMTP.

Posted: Fri Apr 24, 2009 1:40 pm
by NuclearFusion
That's a pity!
Any other library available for that functionality?

Posted: Mon May 04, 2009 6:56 am
by Kukulkan
Any other library available for that functionality?
No, neither the PB own SMTP functions nor the PureSMTP library are supporting SSL/TLS connections. As google only supports theese type of connections, you are currently not able to use gmail accounts together with PureBasic.

There may be a way to realize using OpenSSL or additional tools like http://www.stunnel.org/.

Kukulkan

Posted: Mon May 04, 2009 7:16 am
by Fangbeast
Ricardo had a working example of stunnel with pureSMTP in this post.

http://www.purebasic.fr/english/viewtop ... ht=stunnel

Posted: Mon May 04, 2009 11:44 am
by NuclearFusion
Thanks!!!