<?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: Multiple emails with “to” and “CC” Alfresco 5.2 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/multiple-emails-with-to-and-cc-alfresco-5-2/m-p/147419#M39028</link>
    <description>&lt;P&gt;Unfortunately Alfresco's default mail action really does not support that case. Only when "to" is not set, "to_many" will be used - and in that case "cc" and "bcc" are completely ignored. There is no point in argueing whether this is sensible or not (it is not in my opinion) as this functionality has always been this broken, and won't ever change. In fact, this is one of the reasons I recently created &lt;A href="https://github.com/Acosix/alfresco-utility/blob/master/core/repository/src/main/java/de/acosix/alfresco/utility/repo/action/SendMailActionExecuter.java#L99" target="_self" rel="nofollow noopener noreferrer"&gt;my own variant of the mail action&lt;/A&gt; in a customer project in which I needed to handle various notifications. My variant allows for "to" to be either a single address or multiple, the same for "cc" and "bcc".&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jul 2021 16:09:25 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2021-07-10T16:09:25Z</dc:date>
    <item>
      <title>Multiple emails with “to” and “CC” Alfresco 5.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/multiple-emails-with-to-and-cc-alfresco-5-2/m-p/147418#M39027</link>
      <description>&lt;P&gt;We have a question for Alfresco 5.2 Using javascript (API) we want to send some emails for a CronJobs that we are developing. We have seen that if we use "mail.parameters.to_many" we cannot send "CC".&lt;/P&gt;&lt;P&gt;We need to send&amp;nbsp;&lt;A href="https://www.myloweslife.life/" target="_self" rel="nofollow noopener noreferrer"&gt;&lt;SPAN&gt;&lt;FONT color="#FFFFFF"&gt;MyLowesLife&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To: "email1@xxx.com", "email2@xxx.com"&lt;/P&gt;&lt;P&gt;cc: "email3@xxx.com"&lt;/P&gt;&lt;P&gt;If we use:&lt;/P&gt;&lt;PRE&gt;mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;to&lt;/SPAN&gt; = &lt;SPAN class="hljs-string"&gt;"email1@xxx.com"&lt;/SPAN&gt;
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;cc&lt;/SPAN&gt; = &lt;SPAN class="hljs-string"&gt;"email3@xxx.com"&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;we correctly receive the "to" and the "CC"&lt;/P&gt;&lt;P&gt;But if we use:&lt;/P&gt;&lt;PRE&gt;mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;to_many&lt;/SPAN&gt; = [&lt;SPAN class="hljs-string"&gt;"email1@xxx.com"&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;"email2@xxx.com"&lt;/SPAN&gt;]
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;cc&lt;/SPAN&gt; = &lt;SPAN class="hljs-string"&gt;"email3@xxx.com"&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;We received in the "to" "email1@xxx.com", "email2@xxx.com" but "CC" empty.&lt;/P&gt;&lt;P&gt;How can you send multiple emails "to" with "CC"? Example with "to" and "CC":&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; subj= &lt;SPAN class="hljs-string"&gt;"prueva de multiples"&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; mail = actions.&lt;SPAN class="hljs-title function_"&gt;create&lt;/SPAN&gt;(&lt;SPAN class="hljs-string"&gt;"mail"&lt;/SPAN&gt;);
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;to&lt;/SPAN&gt; =&lt;SPAN class="hljs-string"&gt;"email1@xxx.com"&lt;/SPAN&gt;;
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;cc&lt;/SPAN&gt; = &lt;SPAN class="hljs-string"&gt;"email3@xxx.com"&lt;/SPAN&gt;;
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;subject&lt;/SPAN&gt; = subj;
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;from&lt;/SPAN&gt; = &lt;SPAN class="hljs-string"&gt;"serverMail.com"&lt;/SPAN&gt;; 
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;text&lt;/SPAN&gt; = &lt;SPAN class="hljs-string"&gt;"This test is OK"&lt;/SPAN&gt;;
mail.&lt;SPAN class="hljs-title function_"&gt;executeAsynchronously&lt;/SPAN&gt;(node);&lt;/PRE&gt;&lt;P&gt;(Works correctlym It works fine, but a "to" and a "CC")&lt;/P&gt;&lt;P&gt;Example 2:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; subj= &lt;SPAN class="hljs-string"&gt;"prueva de multiples"&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; mail = actions.&lt;SPAN class="hljs-title function_"&gt;create&lt;/SPAN&gt;(&lt;SPAN class="hljs-string"&gt;"mail"&lt;/SPAN&gt;);
&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt; emails = [&lt;SPAN class="hljs-string"&gt;"email1@xxx.com"&lt;/SPAN&gt;,&lt;SPAN class="hljs-string"&gt;"email2@xxx.com"&lt;/SPAN&gt;,&lt;SPAN class="hljs-string"&gt;"email3@xxx.com"&lt;/SPAN&gt;];
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;to_many&lt;/SPAN&gt; = emails;
mail.&lt;SPAN class="hljs-property"&gt;parameters&lt;/SPAN&gt;.&lt;SPAN class="hljs-property"&gt;cc&lt;/SPAN&gt; = &lt;SPAN class="hljs-string"&gt;""&lt;/SPAN&gt;email4CC@xxx.&lt;SPAN class="hljs-property"&gt;com&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;";
mail.parameters.subject = subj;
mail.parameters.from = "&lt;/SPAN&gt;serverMail.&lt;SPAN class="hljs-property"&gt;com&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;"; 
mail.parameters.text = "&lt;/SPAN&gt;&lt;SPAN class="hljs-title class_"&gt;This&lt;/SPAN&gt; test is not &lt;SPAN class="hljs-title class_"&gt;Ok&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;";
mail.executeAsynchronously(node);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;(Sends the "to_many", but the "CC" does not send it)&lt;/P&gt;&lt;P&gt;We want to send multiple emails in "to" and multiple in "CC".&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The most important thing for us is to be able to send one "to" and multiple "CC"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks guys&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 10:40:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/multiple-emails-with-to-and-cc-alfresco-5-2/m-p/147418#M39027</guid>
      <dc:creator>charlenecart12</dc:creator>
      <dc:date>2021-07-10T10:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple emails with “to” and “CC” Alfresco 5.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/multiple-emails-with-to-and-cc-alfresco-5-2/m-p/147419#M39028</link>
      <description>&lt;P&gt;Unfortunately Alfresco's default mail action really does not support that case. Only when "to" is not set, "to_many" will be used - and in that case "cc" and "bcc" are completely ignored. There is no point in argueing whether this is sensible or not (it is not in my opinion) as this functionality has always been this broken, and won't ever change. In fact, this is one of the reasons I recently created &lt;A href="https://github.com/Acosix/alfresco-utility/blob/master/core/repository/src/main/java/de/acosix/alfresco/utility/repo/action/SendMailActionExecuter.java#L99" target="_self" rel="nofollow noopener noreferrer"&gt;my own variant of the mail action&lt;/A&gt; in a customer project in which I needed to handle various notifications. My variant allows for "to" to be either a single address or multiple, the same for "cc" and "bcc".&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 16:09:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/multiple-emails-with-to-and-cc-alfresco-5-2/m-p/147419#M39028</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-07-10T16:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple emails with “to” and “CC” Alfresco 5.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/multiple-emails-with-to-and-cc-alfresco-5-2/m-p/147420#M39029</link>
      <description>&lt;P&gt;Cross-posted here: &lt;A href="https://stackoverflow.com/questions/68267407/multiple-emails-with-to-and-cc-alfresco-5-2" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/68267407/multiple-emails-with-to-and-cc-alfresco-5-2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 17:46:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/multiple-emails-with-to-and-cc-alfresco-5-2/m-p/147420#M39029</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2021-07-14T17:46:19Z</dc:date>
    </item>
  </channel>
</rss>

