diff --git a/ChangeLog.txt b/ChangeLog.txt index d4e9a6ed7f..e1006e6671 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,14 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-03-12 09:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/hbtip/sendmail.prg + ! fixed wrong login conditions - AICS it's old problem which had existed + from very long time. + + * contrib/hbtip/smtpcli.prg + ! eliminated redundant processing EHLO processing + 2015-03-11 16:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbtip/hbtip.hbx * contrib/hbtip/httpcli.prg diff --git a/contrib/hbtip/sendmail.prg b/contrib/hbtip/sendmail.prg index 08b8967edf..3e8c217b4a 100644 --- a/contrib/hbtip/sendmail.prg +++ b/contrib/hbtip/sendmail.prg @@ -93,7 +93,6 @@ FUNCTION hb_SendMail( cServer, nPort, cFrom, xTo, xCC, xBCC, cBody, cSubject, ; LOCAL oUrl LOCAL oUrl1 - LOCAL lConnectPlain := .F. LOCAL lAuthTLS := .F. LOCAL lConnect := .T. LOCAL oPop @@ -215,19 +214,8 @@ FUNCTION hb_SendMail( cServer, nPort, cFrom, xTo, xCC, xBCC, cBody, cSubject, ; lAuthTLS := oInMail:lTLS - IF oInMail:lAuthLogin - IF oInMail:Auth( cUser, cSMTPPass ) - lConnectPlain := .T. - ELSE - lConnect := .F. - ENDIF - ENDIF - - IF oInMail:lAuthPlain .AND. ! lConnect - IF ! oInMail:AuthPlain( cUser, cSMTPPass ) - lConnect := .F. - ENDIF - ELSEIF ! lConnectPlain + IF ! ( oInMail:lAuthLogin .AND. oInMail:Auth( cUser, cSMTPPass ) ) .AND. ; + ! ( oInMail:lAuthPlain .AND. oInMail:AuthPlain( cUser, cSMTPPass ) ) lConnect := .F. ENDIF ELSE diff --git a/contrib/hbtip/smtpcli.prg b/contrib/hbtip/smtpcli.prg index d3e669e42c..514f0d8f84 100644 --- a/contrib/hbtip/smtpcli.prg +++ b/contrib/hbtip/smtpcli.prg @@ -297,21 +297,13 @@ METHOD Write( cData, nLen, bCommit ) CLASS TIPClientSMTP METHOD ServerSuportSecure( /* @ */ lAuthPlain, /* @ */ lAuthLogin ) CLASS TIPClientSMTP - lAuthLogin := .F. - lAuthPlain := .F. - IF ::OpenSecure() - DO WHILE .T. - ::GetOk() - IF ::cReply == NIL - EXIT - ELSEIF "LOGIN" $ ::cReply - lAuthLogin := .T. - ELSEIF "PLAIN" $ ::cReply - lAuthPlain := .T. - ENDIF - ENDDO + lAuthLogin := ::lAuthLogin + lAuthPlain := ::lAuthPlain ::Close() + ELSE + lAuthLogin := .F. + lAuthPlain := .F. ENDIF RETURN lAuthLogin .OR. lAuthPlain