Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-21838

Define sourceBeanName for mail in action-services-context.xml

    Details

    • Triage:
      ACE

      Description

      I need to add a new customized mail action (to add some mail headers and other bits and pieces - see https://github.com/malariagen/alfresco-discussions/blob/master/discussions-email/src/main/java/net/malariagen/alfresco/action/CustomMailAction.java)

      The problem I have is that if I add an action to the OutboundSMTP subsystem then it will break the default mail action.

      The easy fix for this is to add the sourceBeanName to the mail definition in action-services-context.xml

      i.e.

          <bean id="mail" class="org.alfresco.repo.management.subsystems.SubsystemProxyFactory">
              <property name="sourceApplicationContextFactory">
                  <ref bean="OutboundSMTP" />
              </property>
              <property name="sourceBeanName">
              	<value>mail</value>
            	</property>
              <property name="interfaces">
                  <list>
                      <value>org.alfresco.repo.action.executer.ActionExecuter</value>
                      <value>org.alfresco.repo.action.executer.TestModeable</value>
                  </list>
              </property>
          </bean>
      

      It might be worth considering making the sourceBeanName mandatory since the proxy breaks if more than one class matches.

      (I haven't raised an issue to improve the mail action even though my changes are generic)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                repositoryteam Repository Team
                Reporter:
                idwright Ian Wright
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Date of First Response: