[ 1723309 ] EMail password is required even if not IsSTMPAuthorization

http://sourceforge.net/tracker/index.php?func=detail&aid=1723309&group_id=176962&atid=879332
This commit is contained in:
teo_sarca 2007-05-22 09:55:46 +00:00
parent 98b7b3791a
commit 40c9fb51c7
2 changed files with 5 additions and 1 deletions

View File

@ -751,7 +751,8 @@ public class MClient extends X_AD_Client
return createEMail (to, subject, message);
// No From details - Error
if (from.getEMail() == null
|| from.getEMailUser() == null || from.getEMailUserPW() == null)
|| from.getEMailUser() == null
|| (isSmtpAuthorization() && from.getEMailUserPW() == null) ) // is SMTP authorization and password is null - teo_sarca [ 1723309 ]
{
log.warning("From EMail incomplete: " + from + " (" + getName() + ")");
return null;

View File

@ -574,6 +574,9 @@ public class MUser extends X_AD_User
String s = getEMailUser();
if (s == null || s.length() == 0)
return false;
// If SMTP authorization is not required, then don't check password - teo_sarca [ 1723309 ]
if (!MClient.get(getCtx()).isSmtpAuthorization())
return true;
s = getEMailUserPW();
return s != null && s.length() > 0;
} // isCanSendEMail