Alfresco CC'd email recipient never added with MailActionExecuter (Java workflow webscript and ActionService)

120 Views Asked by At

I'm trying to determine where the error may be with my current attempt at sending emails from an Alfresco Java workflow task (TaskCreateListener). It all seems to work fine, however when adding a CC recipient the email never arrives*. Also when the PARAM_TO recipient receives the email there is no CC recipient listed, so it's almost as if the CC recipient is never actually added. Mail server being used is from a locally installed instance of Alfresco and has been working well for sending the TO emails. This is the first time I've seen a problem.

*never arrives for the CC'd recipient (normal TO recipient receives the email), different email addresses used on different servers (my employer and hotmail and vice versa).

Action mailAction = actionService.createAction(MailActionExecuter.NAME);
        mailAction.setParameterValue(MailActionExecuter.PARAM_SUBJECT, "Proposal Submitted");        
        mailAction.setParameterValue(MailActionExecuter.PARAM_TO, recipient);
        mailAction.setParameterValue(MailActionExecuter.PARAM_FROM, senderAddr);
        mailAction.setParameterValue(MailActionExecuter.PARAM_TEXT, email);
        mailAction.setParameterValue(MailActionExecuter.PARAM_HTML, true);
        mailAction.setParameterValue(MailActionExecuter.PARAM_CC, "[email protected]");

        try {
            actionService.executeAction(mailAction, null, true, true);
        }catch(Exception e) {
            Logger logger = Logger.getLogger(this.getClass().getPackage().getName());
            logger.error("Unable to send email upon workflow task", e);
        }

Is there anything else that needs to be added to get the CC parameter to work?

Alfresco SDK version: 3.1.0 Running locally from Eclipse.

Edit

Alfresco logs settings:

log4j.logger.org.alfresco.repo.jscript.ScriptLogger=TRACE
org.alfresco.repo.action.executer.MailActionExecuter=TRACE
log4j.logger.org.alfresco.repo.action.ActionServiceImpl=TRACE
org.alfresco.repo.action.executer.ActionExecuterAbstractBase=TRACE

Output:

2021-07-07 16:06:07,779 DEBUG 

    [org.alfresco.repo.action.ActionServiceImpl] [http-bio-8080-exec-25] addPostTransactionPendingAction action chain = null
    2021-07-07 16:06:07,779 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [http-bio-8080-exec-25] Current action = 9e499b23-23ad-47f7-94e3-7a21408f4dc2
    2021-07-07 16:06:07,779 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [http-bio-8080-exec-25] Doing addPostTransactionPendingAction
    2021-07-07 16:06:07,779 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [http-bio-8080-exec-25] The current user is: admin
    2021-07-07 16:06:07,779 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [http-bio-8080-exec-25] The current tenant is: 
    2021-07-07 16:06:07,882 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [mailAsyncAction3] Execute action impl action chain = null
    2021-07-07 16:06:07,883 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [mailAsyncAction3] Current action = 9e499b23-23ad-47f7-94e3-7a21408f4dc2
    2021-07-07 16:06:07,884 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [mailAsyncAction3] Doing executeActionImpl
    2021-07-07 16:06:07,886 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [mailAsyncAction3] Adding mail, 9e499b23-23ad-47f7-94e3-7a21408f4dc2 to action chain.
    2021-07-07 16:06:07,887 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [mailAsyncAction3]   All Condition Evaluation Result - true
    2021-07-07 16:06:07,888 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [mailAsyncAction3] The action is being executed as the user: admin
    2021-07-07 16:06:12,597 DEBUG [org.alfresco.repo.action.ActionServiceImpl] [mailAsyncAction3] Resetting the action chain.
0

There are 0 best solutions below