FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Clase TPOP3 y SSL
Posts: 728
Joined: Fri Oct 07, 2005 07:38 AM
Clase TPOP3 y SSL
Posted: Thu May 28, 2015 10:05 AM
Hola amigos, estoy utilizando la clase Tpop3 para recibir correos de forma muy c贸moda pero me encuentro con un cliente que utiliza correo de gmail.
El problema, por lo que veo, es que gmail requiere una conexi贸n SSL para funcionar. 驴Alguien se ha encontrado con este problema? El env铆o de correos v铆a CDO me funciona sin problemas, pero en este caso necesito recibirlos.
Gracias!

PD. Estoy probando con el testpop3 de la carpeta samples.

Code (fw): Select all Collapse
// Testing FiveWin new Internet incoming mail (POP3 protocol) Class

#include "FiveWin.ch"

static oWnd

//----------------------------------------------------------------------------//

function Main()

聽 聽local oBar

聽 聽DEFINE WINDOW oWnd TITLE "Receiving Internet Mail from FiveWin"

聽 聽DEFINE BUTTONBAR oBar _3D OF oWnd

聽 聽DEFINE BUTTON OF oBar ACTION GetMail() TOOLTIP "Get Mail"

聽 聽SET MESSAGE OF oWnd TO "Ready" NOINSET DATE TIME KEYBOARD

聽 聽ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

function GetMail()

聽 聽local oInMail

聽 聽oWnd:SetMsg( "Geting Internet email..." )

聽 聽oInMail = TPop3():New( <ip>, <puerto>, <user>, <pass> ) 聽// mail server IP
聽 聽oInMail:lDelMsgs:=.F.

聽 聽oInMail:bConnecting = { || oWnd:SetMsg( "Connecting ..." ) }
聽 聽oInMail:bConnected 聽= { || oWnd:SetMsg( "Connected" ) }
聽 聽oInMail:bDone 聽 聽 聽 = { || ReadEmails( oInMail ) }

聽 聽oInMail:GetMail()

return nil

//----------------------------------------------------------------------------//

function ReadEmails( oInMail )

聽 聽local n

聽 聽MsgInfo( "Total emails: " + Str( Len( oInMail:aMsgs ) ) )

聽 聽for n = 1 to Len( oInMail:aMsgs )
聽 聽 聽 MsgInfo( oInMail:aMsgs[ n ] )
聽 聽next

return nil

//----------------------------------------------------------------------------//
Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clase TPOP3 y SSL
Posted: Thu May 28, 2015 04:24 PM

Angel,

Revisa esto:

viewtopic.php?p=173396#p173396

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 728
Joined: Fri Oct 07, 2005 07:38 AM
Re: Clase TPOP3 y SSL
Posted: Thu May 28, 2015 04:44 PM

Gracias Antonio, el sistema que comentas es el que ya estoy utilizando para enviar correos, sin problemas.
Mi situaci贸n ahora es que necesito leer los correos de gmail, no enviarlos. :roll: :roll:

Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clase TPOP3 y SSL
Posted: Thu May 28, 2015 05:58 PM

Angel,

Revisa esto:

viewtopic.php?p=120783#p120783

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 728
Joined: Fri Oct 07, 2005 07:38 AM
Re: Clase TPOP3 y SSL
Posted: Thu May 28, 2015 07:01 PM

Gracias de nuevo Antonio, el tema que me sugieres hace referencia a la clase que utilizo actualmente y, a pesar de permitir especificar el puerto de comunicaci贸n, me temo que no gestiona (o yo desconozco c贸mo) el protocolo SSL necesario para leer los correos de gmail :cry: :cry:

Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4
Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM
Re: Clase TPOP3 y SSL
Posted: Sat May 30, 2015 06:06 AM
Posts: 728
Joined: Fri Oct 07, 2005 07:38 AM
Re: Clase TPOP3 y SSL
Posted: Sat May 30, 2015 08:34 PM
Baxajaun wrote:Buenos d铆as Angel,

has revisado https://support.google.com/mail/troubleshooter/1668960?hl=es#ts=1665119

Saludos


S铆, gracias Baxajaun. Ya lo revis茅 pero nada, el tema es el dichoso requisito de usar SSL como indica en el enlace que me has enviado.

Code (fw): Select all Collapse
Servidor de correo entrante (POP3) - requiere SSL:聽 pop.gmail.com
Utilizar SSL: S铆
Puerto: 995
Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4

Continue the discussion