<?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 tSendMail to multiple recipients get from table in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tSendMail-to-multiple-recipients-get-from-table/m-p/2348521#M115638</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a job design which works good for single email, but now i have a table for emails and need to get those emails and send report to that list. This table don't have directly link with the report tMap_1. Like this is separate source and not link with report data. Below is job design, Please advise which component i should use to complete this. I am using MySQL Database.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.jpg" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LxNT.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135797i958F91B55646F929/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LxNT.jpg" alt="0683p000009LxNT.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 08:12:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T08:12:39Z</dc:date>
    <item>
      <title>tSendMail to multiple recipients get from table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSendMail-to-multiple-recipients-get-from-table/m-p/2348521#M115638</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a job design which works good for single email, but now i have a table for emails and need to get those emails and send report to that list. This table don't have directly link with the report tMap_1. Like this is separate source and not link with report data. Below is job design, Please advise which component i should use to complete this. I am using MySQL Database.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.jpg" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LxNT.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135797i958F91B55646F929/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LxNT.jpg" alt="0683p000009LxNT.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:12:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSendMail-to-multiple-recipients-get-from-table/m-p/2348521#M115638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: tSendMail to multiple recipients get from table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSendMail-to-multiple-recipients-get-from-table/m-p/2348522#M115639</link>
      <description>&lt;P&gt;You want to send 1 email to a list of persons issued from your DB, right?&lt;/P&gt;
&lt;P&gt;So you just have to build the lsit in your tJavaRow using a global variable:&lt;/P&gt;
&lt;PRE&gt;globalMap.put("emailList", ((String)globalMap.getOrDefault("emailList", "")) + "," + input_row.email);&lt;/PRE&gt;
&lt;P&gt;Then in your tSendMail you just have to get the content of the list but the 1rst character to populate the "To" field:&lt;/P&gt;
&lt;PRE&gt;((String)globalMap.get("emailList")).substring(1)&lt;/PRE&gt;
&lt;P&gt;In case of, it could be a good idea to add a tJava (don't change anything inside) before tSendMail, both connected by an "If" trigger with the following condition:&lt;/P&gt;
&lt;PRE&gt;((String)globalMap.get("emailList")) != null&lt;/PRE&gt;
&lt;P&gt;This is to avoid to call tSendMail when the list is empty.&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 17:49:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSendMail-to-multiple-recipients-get-from-table/m-p/2348522#M115639</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-27T17:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: tSendMail to multiple recipients get from table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSendMail-to-multiple-recipients-get-from-table/m-p/2348523#M115640</link>
      <description>&lt;P&gt;Thank You, it worked fine.&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 08:20:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSendMail-to-multiple-recipients-get-from-table/m-p/2348523#M115640</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-28T08:20:54Z</dc:date>
    </item>
  </channel>
</rss>

