<?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: [resolved] Problem with tSendMail and extern variables in properties file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377221#M139136</link>
    <description>Hi Burnside,
&lt;BR /&gt;
&lt;BR /&gt;Please take a look at a related forum:
&lt;BR /&gt;https://community.talend.com/t5/Design-and-Development/resolved-need-to-send-the-data-of-tLogRow-to-tSendMail/m-p/70061
&lt;BR /&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
    <pubDate>Tue, 01 Sep 2015 08:22:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-01T08:22:14Z</dc:date>
    <item>
      <title>[resolved] Problem with tSendMail and extern variables in properties file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377218#M139133</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I try to use the component tSendMail with variables from an external file, but nothing goes right...&lt;BR /&gt;So I have&lt;BR /&gt;tFileInputProperties_1 ====Main====&amp;gt;tSetGlobalVar_1&lt;BR /&gt;&amp;nbsp; &amp;nbsp;||OnSubJobOk&lt;BR /&gt;&amp;nbsp; &amp;nbsp;||&lt;BR /&gt;tSendMail&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;In tFileInputProperties_1 :&lt;BR /&gt;File format : .properties&lt;BR /&gt;file Name: "./emailDetails.properties"&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;In tSetGlobalVar_1&lt;BR /&gt;Key : "row1.key"&lt;BR /&gt;Value : "row1.value"&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;In tSendMail&lt;BR /&gt;To : ((String)globalMap.get("To"))&lt;BR /&gt;From : ((String)globalMap.get("From"))&lt;BR /&gt;&lt;BR /&gt;I have also try that:&lt;BR /&gt;To : ((String)globalMap.get("row2.value"))&lt;BR /&gt;From : ((String)globalMap.get("row1.value"))&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;In emailDetail.properties&lt;BR /&gt;From = abc@abc.com&lt;BR /&gt;To= sos@sos.net&lt;BR /&gt;host=smtp.gmail.com&lt;BR /&gt;port= 465&lt;BR /&gt;...&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;What's o the correct method?&lt;BR /&gt;Thank's&lt;BR /&gt;Burnside.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 09:58:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377218#M139133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-31T09:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Problem with tSendMail and extern variables in properties file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377219#M139134</link>
      <description>It looks like because you're using global variables, you're not passing the right key/value to the right global variable. Looks like you might have to do so conditionally (if key = "To" then load to variable "To" etc...). I suspect that if you were to print out the values of your global variables, you'd find that only the last set in your properties file stuck. It's always good practice to print out the values of your variables (System.out.println("key: " +&amp;nbsp; 
&lt;FONT size="2"&gt;&lt;FONT face="consolas," monaco=""&gt;((String)globalMap.get("To")) )...&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;An alternative to using global variables would be to use context variables. Context variables are global variables whose values can be set outside the Talend job - from a file, like you're doing. Because the key/value pairs in the file map to key/value pairs in the job, it makes loading the values very easy. And, there's a component for doing so. As shown below, create context variables in your job, read the values from the file, connect them to a tContextLoad, select options to print the values - so you can confirm that your job is using the right values.&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGfz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128466iDCE44D144A0C5274/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGfz.png" alt="0683p000009MGfz.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGXh.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158083i2CFBD73CA76524C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGXh.png" alt="0683p000009MGXh.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGYQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149844i9E8323F00DB37886/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGYQ.png" alt="0683p000009MGYQ.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 31 Aug 2015 14:15:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377219#M139134</guid>
      <dc:creator>willm1</dc:creator>
      <dc:date>2015-08-31T14:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Problem with tSendMail and extern variables in properties file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377220#M139135</link>
      <description>HI,
&lt;BR /&gt;Thank's for your answer, but I'm new and I don't know yet everything...and english is not my mother language.
&lt;BR /&gt;Is it possible to have an example from an xls file?
&lt;BR /&gt;Ot just to have a vue from the dashboard?
&lt;BR /&gt;regards
&lt;BR /&gt;Burnside.</description>
      <pubDate>Mon, 31 Aug 2015 14:42:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377220#M139135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-31T14:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Problem with tSendMail and extern variables in properties file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377221#M139136</link>
      <description>Hi Burnside,
&lt;BR /&gt;
&lt;BR /&gt;Please take a look at a related forum:
&lt;BR /&gt;https://community.talend.com/t5/Design-and-Development/resolved-need-to-send-the-data-of-tLogRow-to-tSendMail/m-p/70061
&lt;BR /&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Tue, 01 Sep 2015 08:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377221#M139136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-01T08:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Problem with tSendMail and extern variables in properties file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377222#M139137</link>
      <description>Hi, 
&lt;BR /&gt; 
&lt;BR /&gt;I have solved my problem with this method. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;tFileInputExcel_1 ---Main--- tFlowToIterate_1 ---Iterate--- tFixedFlowInput_1 --- Iterate --- TSendMail_1&lt;BR /&gt;tFileInputExcel_1 : The xls file with the values&lt;BR /&gt;tFlowToIterate_1 : Key="Mail" and value=Mail&lt;BR /&gt;tFixedFlowInput_1 : mode= Use Single Table&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;values= &lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|_&amp;gt;Column =&amp;gt;Mail&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|_&amp;gt;values =&amp;gt;((String)globalMap.get("Mail"))&lt;BR /&gt;TSendMail_2 : Field to : ((String)globalMap.get("Mail"))&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;I join a print screen of the dashboard. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/316187/XLSTOMAIL.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGg4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158297i643C669911BDE2A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGg4.png" alt="0683p000009MGg4.png" /&gt;&lt;/span&gt;&lt;/A&gt; 
&lt;BR /&gt;Hope It help you. 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;</description>
      <pubDate>Fri, 11 Sep 2015 13:19:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377222#M139137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-11T13:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Problem with tSendMail and extern variables in properties file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377223#M139138</link>
      <description>Hi Burnside,&lt;BR /&gt;&lt;BR /&gt;Thanks for your feedback and sharing your solution with us.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Tue, 15 Sep 2015 03:37:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-tSendMail-and-extern-variables-in/m-p/2377223#M139138</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-15T03:37:39Z</dc:date>
    </item>
  </channel>
</rss>

