From acc1a252e80f8ade0d276b9611d58297caf4269f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Mon, 9 Mar 2015 18:33:06 +0100 Subject: [PATCH] 2015-03-09 18:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbtip/smtpcli.prg ! added missing space after AUTH PLAIN ! resend EHLO command after STARTTLS ; Thanks to Rolf for information about both problems. --- ChangeLog.txt | 6 ++++++ contrib/hbtip/smtpcli.prg | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index caf899790f..41df24a6b6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,12 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-03-09 18:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/hbtip/smtpcli.prg + ! added missing space after AUTH PLAIN + ! resend EHLO command after STARTTLS + ; Thanks to Rolf for information about both problems. + 2015-03-09 18:17 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbtip/client.prg * removed trailing spaces diff --git a/contrib/hbtip/smtpcli.prg b/contrib/hbtip/smtpcli.prg index ee82946fd0..ddba8da6fe 100644 --- a/contrib/hbtip/smtpcli.prg +++ b/contrib/hbtip/smtpcli.prg @@ -168,7 +168,8 @@ METHOD StartTLS() CLASS TIPClientSMTP IF ::GetOk() .AND. ::lHasSSL ::EnableSSL( .T. ) ActivateSSL( Self ) - RETURN .T. + ::inetSendAll( ::SocketCon, "EHLO " + iif( Empty( ::cClientHost ), "TIPClientSMTP", ::cClientHost ) + ::cCRLF ) + RETURN ::GetOk() ENDIF RETURN .F. @@ -263,7 +264,7 @@ METHOD Auth( cUser, cPass ) CLASS TIPClientSMTP METHOD AuthPlain( cUser, cPass ) CLASS TIPClientSMTP - ::inetSendAll( ::SocketCon, "AUTH PLAIN" + hb_base64Encode( hb_BChar( 0 ) + cUser + hb_BChar( 0 ) + cPass ) + ::cCRLF ) + ::inetSendAll( ::SocketCon, "AUTH PLAIN " + hb_base64Encode( hb_BChar( 0 ) + cUser + hb_BChar( 0 ) + cPass ) + ::cCRLF ) RETURN ::isAuth := ::GetOk()