mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-30 18:15:39 +00:00
Merged DEV to HEAD (5.0/Cloud) ACE-2689 : SMTP authentication fails. But mail.smtp.auth=false
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@85521 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
e862da0715
commit
030183ae6c
@ -26,6 +26,7 @@ import javax.mail.Session;
|
||||
import javax.mail.Transport;
|
||||
import javax.mail.URLName;
|
||||
|
||||
import org.alfresco.util.PropertyCheck;
|
||||
import org.apache.commons.pool.KeyedPoolableObjectFactory;
|
||||
import org.apache.commons.pool.impl.GenericKeyedObjectPool;
|
||||
import org.slf4j.Logger;
|
||||
@ -287,4 +288,30 @@ public class AlfrescoJavaMailSender extends JavaMailSenderImpl
|
||||
{
|
||||
transportPool.setMinEvictableIdleTimeMillis(time);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUsername(String userName)
|
||||
{
|
||||
if (PropertyCheck.isValidPropertyString(userName))
|
||||
{
|
||||
super.setUsername(userName);
|
||||
}
|
||||
else
|
||||
{
|
||||
super.setUsername(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPassword(String password)
|
||||
{
|
||||
if (PropertyCheck.isValidPropertyString(password))
|
||||
{
|
||||
super.setPassword(password);
|
||||
}
|
||||
else
|
||||
{
|
||||
super.setPassword(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user