<?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 Send Email to Contacts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Send-Email-to-Contacts/m-p/1406411#M612663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Com,&lt;/P&gt;&lt;P&gt;i have a question! I habe a table/field where u can find some emailadresses. Now i want a Button and if i click on it, i want to send them all an email. I tought that if i create a button, select action, open url and with the conact-function and mailto, it will work, but it does not work. Can someone help me. Im new &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Sep 2017 08:41:09 GMT</pubDate>
    <dc:creator>5abi0001</dc:creator>
    <dc:date>2017-09-25T08:41:09Z</dc:date>
    <item>
      <title>Send Email to Contacts</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Email-to-Contacts/m-p/1406411#M612663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Com,&lt;/P&gt;&lt;P&gt;i have a question! I habe a table/field where u can find some emailadresses. Now i want a Button and if i click on it, i want to send them all an email. I tought that if i create a button, select action, open url and with the conact-function and mailto, it will work, but it does not work. Can someone help me. Im new &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2017 08:41:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Email-to-Contacts/m-p/1406411#M612663</guid>
      <dc:creator>5abi0001</dc:creator>
      <dc:date>2017-09-25T08:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email to Contacts</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Email-to-Contacts/m-p/1406412#M612664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.&amp;nbsp;&amp;nbsp; create a Variable, e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; vEmailadresses = concat(DISTINCT(&lt;SPAN style="color: #ff0000;"&gt;email&lt;/SPAN&gt;),';')&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Note: &lt;SPAN style="color: #ff0000;"&gt;email&lt;/SPAN&gt; is the Field containing the adresses)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; add following code into mudule and adapt Infos according your environment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15063535406547879 jive_text_macro" jivemacro_uid="_15063535406547879" modifiedtitle="true"&gt;
&lt;P&gt;Sub SendMail&lt;/P&gt;
&lt;P&gt;Dim objEmail&lt;/P&gt;
&lt;P&gt;set v=ActiveDocument.Variables("vEmailadresses")&lt;/P&gt;
&lt;P&gt;getEmail = v.GetContent.String&lt;/P&gt;
&lt;P&gt;'msgbox(getEmail)&lt;/P&gt;
&lt;P&gt;Emailreceiverlist = getEmail&lt;/P&gt;
&lt;P&gt;timestamp1 = Timer &lt;/P&gt;
&lt;P&gt;Timestamp="-"&amp;amp;Year(Now())&amp;amp;"-"&amp;amp;Month(Now())&amp;amp;"-"&amp;amp;Day(Now())&amp;amp;"--"&amp;amp;Hour(Now())&amp;amp;"-"&amp;amp;Minute(Now())&amp;amp;"-"&amp;amp;Second(Now())&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Const cdoSendUsingPort = 2 ' Send the message using SMTP&lt;/P&gt;
&lt;P&gt;Const cdoBasicAuth = 1 ' Clear-text authentication&lt;/P&gt;
&lt;P&gt;Const cdoTimeout = 60 ' Timeout for SMTP in seconds&lt;/P&gt;
&lt;P&gt;mailServer = "smtp.gmail.com" 'adapt with your emailproviders smtp info&lt;/P&gt;
&lt;P&gt;SMTPport = 465&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;mailusername = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:YourEmail@gmail.com"&gt;YourEmail@gmail.com&lt;/A&gt;&lt;SPAN&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'adapt with your credentials&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;mailpassword = "YourPassword" 'adapt with your credentials&lt;/P&gt;
&lt;P&gt;mailto = Emailreceiverlist&lt;/P&gt;
&lt;P&gt;mailSubject = "Report"&amp;amp;Timestamp&lt;/P&gt;
&lt;P&gt;mailBody = "Attached the current Report" &lt;/P&gt;
&lt;P&gt;Set objEmail = CreateObject("CDO.Message")&lt;/P&gt;
&lt;P&gt;Set objConf = objEmail.Configuration&lt;/P&gt;
&lt;P&gt;Set objFlds = objConf.Fields&lt;/P&gt;
&lt;P&gt;With objFlds&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Item("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/sendusing" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/sendusing&lt;/A&gt;&lt;SPAN&gt;") = cdoSendUsingPort&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Item("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpserver" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/smtpserver&lt;/A&gt;&lt;SPAN&gt;") = mailServer&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Item("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpserverport" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/smtpserverport&lt;/A&gt;&lt;SPAN&gt;") = SMTPport&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Item("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpusessl" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/smtpusessl&lt;/A&gt;&lt;SPAN&gt;") = True&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Item("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout&lt;/A&gt;&lt;SPAN&gt;") = cdoTimeout&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Item("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/smtpauthenticate&lt;/A&gt;&lt;SPAN&gt;") = cdoBasicAuth&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Item("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/sendusername" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/sendusername&lt;/A&gt;&lt;SPAN&gt;") = mailusername&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.Item("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/sendpassword" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/sendpassword&lt;/A&gt;&lt;SPAN&gt;") = mailpassword&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;.Update&lt;/P&gt;
&lt;P&gt;End With&lt;/P&gt;
&lt;P&gt;objEmail.To = mailto&lt;/P&gt;
&lt;P&gt;objEmail.From = mailusername&lt;/P&gt;
&lt;P&gt;objEmail.Subject = mailSubject&lt;/P&gt;
&lt;P&gt;objEmail.TextBody = mailBody&lt;/P&gt;
&lt;P&gt;objEmail.AddAttachment "C:\Users\Admin\Desktop\Test.csv" 'If you want to add an attachment put path of file here&lt;/P&gt;
&lt;P&gt;objEmail.Send&lt;/P&gt;
&lt;P&gt;Set objFlds = Nothing&lt;/P&gt;
&lt;P&gt;Set objConf = Nothing&lt;/P&gt;
&lt;P&gt;Set objEmail = Nothing&lt;/P&gt;
&lt;P&gt;timestamp2 =&amp;nbsp; Timer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;MsgBox("the email sent to"&amp;amp;" "&amp;amp;adressat&amp;amp;""&amp;amp;" was successfully transferred."&amp;amp;" "&amp;amp;" the sendingprocess took "&amp;amp;"&amp;nbsp; "&amp;amp;Round((timestamp2-timestamp1)/60, 2)&amp;amp;"&amp;nbsp; "&amp;amp;"min.")&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;End Sub &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using gmail for sending the emails make sure that the following option is enabled:&lt;/P&gt;&lt;P&gt;&lt;A href="https://myaccount.google.com/lesssecureapps" title="https://myaccount.google.com/lesssecureapps"&gt;Account settings&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2017 15:38:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Email-to-Contacts/m-p/1406412#M612664</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2017-09-25T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email to Contacts</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Email-to-Contacts/m-p/1406413#M612665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks, i already managed it. I used the Action open URL and use the function mailto as i wrote before. But thank u alot. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 07:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Email-to-Contacts/m-p/1406413#M612665</guid>
      <dc:creator>5abi0001</dc:creator>
      <dc:date>2017-09-26T07:29:45Z</dc:date>
    </item>
  </channel>
</rss>

