mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (4.3/Cloud)
73354: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud) 73241: MNT-11079: Merged DEV to V4.2-BUG-FIX (4.2.3) 67748: MNT-11079: "Start Workflow" email notification is not sent out if the recipient's User Name contians "@" - During defining mail recipients first check email field and only then check if the username is the valid email address. Fix formatting and cleanup for other MailActionExecuterTest tests. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@74772 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1169,19 +1169,19 @@ public class MailActionExecuter extends ActionExecuterAbstractBase
|
||||
{
|
||||
if (personExists(authority))
|
||||
{
|
||||
EmailValidator emailValidator = EmailValidator.getInstance(true);
|
||||
if (validateAddresses && emailValidator.isValid(authority))
|
||||
String address = getPersonEmail(authority);
|
||||
if (address != null && address.length() != 0 && validateAddress(address))
|
||||
{
|
||||
Locale locale = getLocaleForUser(authority);
|
||||
recipients.add(new Pair<String, Locale>(authority, locale));
|
||||
recipients.add(new Pair<String, Locale>(address, locale));
|
||||
}
|
||||
else
|
||||
{
|
||||
String address = getPersonEmail(authority);
|
||||
if (address != null && address.length() != 0 && validateAddress(address))
|
||||
EmailValidator emailValidator = EmailValidator.getInstance(true);
|
||||
if (validateAddresses && emailValidator.isValid(authority))
|
||||
{
|
||||
Locale locale = getLocaleForUser(authority);
|
||||
recipients.add(new Pair<String, Locale>(address, locale));
|
||||
recipients.add(new Pair<String, Locale>(authority, locale));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1211,22 +1211,22 @@ public class MailActionExecuter extends ActionExecuterAbstractBase
|
||||
// Check the user name to be a valid email and we don't need to log an error in this case
|
||||
// ALF-19231
|
||||
// Validate the email, allowing for local email addresses
|
||||
EmailValidator emailValidator = EmailValidator.getInstance(true);
|
||||
if (validateAddresses && emailValidator.isValid(userAuth))
|
||||
String address = getPersonEmail(userAuth);
|
||||
if (address != null && address.length() != 0 && validateAddress(address))
|
||||
{
|
||||
if (userAuth != null && userAuth.length() != 0)
|
||||
{
|
||||
Locale locale = getLocaleForUser(userAuth);
|
||||
recipients.add(new Pair<String, Locale>(userAuth, locale));
|
||||
}
|
||||
Locale locale = getLocaleForUser(userAuth);
|
||||
recipients.add(new Pair<String, Locale>(address, locale));
|
||||
}
|
||||
else
|
||||
{
|
||||
String address = getPersonEmail(userAuth);
|
||||
if (address != null && address.length() != 0 && validateAddress(address))
|
||||
EmailValidator emailValidator = EmailValidator.getInstance(true);
|
||||
if (validateAddresses && emailValidator.isValid(userAuth))
|
||||
{
|
||||
Locale locale = getLocaleForUser(userAuth);
|
||||
recipients.add(new Pair<String, Locale>(address, locale));
|
||||
if (userAuth != null && userAuth.length() != 0)
|
||||
{
|
||||
Locale locale = getLocaleForUser(userAuth);
|
||||
recipients.add(new Pair<String, Locale>(userAuth, locale));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user