<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Override out-of-the box &amp;quot;mail&amp;quot; Repo-tier action in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116830#M32354</link>
    <description>&lt;P&gt;OOTB MailExecutorAction doesn't allow sending the attachment with emails. Refer this post, &lt;SPAN class=""&gt;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://hub.alfresco.com/t5/user/viewprofilepage/user-id/59782" target="_self" rel="nofollow noopener noreferrer"&gt;rjohnson&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;has an example of overriden action to handle attachement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-hub/send-html-mail-with-attachments/ba-p/289997" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-hub/send-html-mail-with-attachments/ba-p/289997&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Nov 2019 15:10:11 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2019-11-22T15:10:11Z</dc:date>
    <item>
      <title>Override out-of-the box "mail" Repo-tier action</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116829#M32353</link>
      <description>&lt;P&gt;Hi, folks! In my project I have a requirement to be able to send emails with attachments. I know that there is a sample implementation of custom action "&lt;EM&gt;Send-As-Email&lt;/EM&gt;", but I needed to override standard "mail" action in such a way that it could send documents as attachents.&lt;/P&gt;&lt;P&gt;Ok, "mail" action is described as a proxy bean in &lt;FONT face="courier new,courier"&gt;action-services-context.xml&lt;/FONT&gt;. Actual "mail" bean is described in &lt;FONT face="courier new,courier"&gt;outboundSMTP-context.xml&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;What I did in Alfresco 5.1 is just overrided&amp;nbsp;outboundSMTP subsystem whith my own implementation of "mail" bean. Everything worked as I expected untill I migrated to Alfresco 6.1.&lt;/P&gt;&lt;P&gt;In Alfresco 6.1 the same approach produced an unexpected behaviour. There was no errors on startup and context initialization, but when I tried to create a "Send email" rule Repo-tier thrown an &lt;STRONG&gt;exception&lt;/STRONG&gt; during rule saving:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;2019-11-22 14:50:00,932 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-nio-9090-exec-7] Exception from executeScript: 10220002 Wrapped Exception (with status template): object is not an instance of declaring class&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;After a debugging session and digging into Alfresco source code I've figured out the only difference between 5.1 and 6.1 in regard of Repo-tier "mail" action defenition is in &lt;FONT face="courier new,courier"&gt;action-services-context.xml&lt;/FONT&gt;:&lt;/P&gt;&lt;P&gt;Alfresco 5.1:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;lt;!-- Import mail action executor from the OutboundSMTP subsystem --&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;bean &lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;="mail" &lt;/SPAN&gt;&lt;SPAN&gt;class&lt;/SPAN&gt;&lt;SPAN&gt;="org.alfresco.repo.management.subsystems.SubsystemProxyFactory"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;property &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;="sourceApplicationContextFactory"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;        &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;ref &lt;/SPAN&gt;&lt;SPAN&gt;bean&lt;/SPAN&gt;&lt;SPAN&gt;="OutboundSMTP" &lt;/SPAN&gt;&lt;SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;property&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;property &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;="interfaces"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;        &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;list&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;            &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;org.alfresco.repo.action.executer.ActionExecuter&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;            &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;org.alfresco.repo.action.executer.TestModeable&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;        &lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;list&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;property&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;bean&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;In Alfresco 6.1:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;lt;!-- Import mail action executor from the OutboundSMTP subsystem --&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;bean &lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;="mail" &lt;/SPAN&gt;&lt;SPAN&gt;class&lt;/SPAN&gt;&lt;SPAN&gt;="org.alfresco.repo.management.subsystems.SubsystemProxyFactory"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;property &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;="sourceApplicationContextFactory"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;        &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;ref &lt;/SPAN&gt;&lt;SPAN&gt;bean&lt;/SPAN&gt;&lt;SPAN&gt;="OutboundSMTP" &lt;/SPAN&gt;&lt;SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;property&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;    &amp;lt;property name="sourceBeanName"&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;        &amp;lt;value&amp;gt;mail&amp;lt;/value&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;    &amp;lt;/property&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;property &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;="interfaces"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;        &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;list&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;            &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;org.alfresco.repo.action.executer.ActionExecuter&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;            &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;org.alfresco.repo.action.executer.TestModeable&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;        &lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;list&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;property&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;bean&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;As you see in Alfresco 6.1 they've added &lt;STRONG&gt;sourceBeanName&lt;/STRONG&gt; property (actually it is optional). Somehow this broke my code. To fix it I had to additionally override that proxy "mail" bean from&amp;nbsp;&lt;FONT face="courier new,courier"&gt;action-services-context.xml&lt;/FONT&gt; in a way it was in Alfresco 5.1 (without&amp;nbsp;&lt;STRONG&gt;sourceBeanName&amp;nbsp;&lt;/STRONG&gt;property). And everything worked fine again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain me this wierd behaviuor?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 08:58:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116829#M32353</guid>
      <dc:creator>Vic</dc:creator>
      <dc:date>2019-11-22T08:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Override out-of-the box "mail" Repo-tier action</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116830#M32354</link>
      <description>&lt;P&gt;OOTB MailExecutorAction doesn't allow sending the attachment with emails. Refer this post, &lt;SPAN class=""&gt;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://hub.alfresco.com/t5/user/viewprofilepage/user-id/59782" target="_self" rel="nofollow noopener noreferrer"&gt;rjohnson&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;has an example of overriden action to handle attachement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-hub/send-html-mail-with-attachments/ba-p/289997" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-hub/send-html-mail-with-attachments/ba-p/289997&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 15:10:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116830#M32354</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2019-11-22T15:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Override out-of-the box "mail" Repo-tier action</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116831#M32355</link>
      <description>&lt;P&gt;Yes, I know that Alfresco doesn't support attachments OOTB. And I was able to override OOTB "mail" action in 5.1 by just overriding "mail" bean in&amp;nbsp;&lt;FONT face="courier new,courier"&gt;outboundSMTP-context.xml&lt;/FONT&gt;. But in 6.1 it was not enough to make it work, I had to additionaly override &lt;U&gt;proxy-bean&lt;/U&gt; from &lt;FONT face="courier new,courier"&gt;action-services-context.xml&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;My point was that it looks odd that one need to additionaly override proxy-bean to make overriden action work.&lt;/P&gt;&lt;P&gt;Anyway, thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 06:24:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116831#M32355</guid>
      <dc:creator>Vic</dc:creator>
      <dc:date>2019-11-25T06:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Override out-of-the box "mail" Repo-tier action</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116832#M32356</link>
      <description>&lt;P&gt;I would suggest to extend the mail executor action instead of overriding the context files unless there is something you are not able to achieve by extending mail executor action. I shared a sample in my last reply. You may consider looking into that as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 14:50:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/override-out-of-the-box-quot-mail-quot-repo-tier-action/m-p/116832#M32356</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2019-11-25T14:50:26Z</dc:date>
    </item>
  </channel>
</rss>

