Problem using PureSMTP library with Gmail

Just starting out? Need help? Post your questions and find answers here.
NuclearFusion
User
User
Posts: 35
Joined: Wed Nov 22, 2006 2:00 pm

Problem using PureSMTP library with Gmail

Post 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.
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Gmail use SMTP on SSL so you can't use PureSMTP.
NuclearFusion
User
User
Posts: 35
Joined: Wed Nov 22, 2006 2:00 pm

Post by NuclearFusion »

That's a pity!
Any other library available for that functionality?
User avatar
Kukulkan
Addict
Addict
Posts: 1415
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Post 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
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4794
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Ricardo had a working example of stunnel with pureSMTP in this post.

http://www.purebasic.fr/english/viewtop ... ht=stunnel
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
NuclearFusion
User
User
Posts: 35
Joined: Wed Nov 22, 2006 2:00 pm

Post by NuclearFusion »

Thanks!!!
Post Reply