<?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: Email Macro not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86536#M762657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it something that i have to write as part of the code ? I am not very aware of it. Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2018 13:13:12 GMT</pubDate>
    <dc:creator>poojask123</dc:creator>
    <dc:date>2018-08-01T13:13:12Z</dc:date>
    <item>
      <title>Email Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86534#M762655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a requirement to send a report as email attachment to a user, i found the below code on the community and used the same, but the execution stops at &lt;STRONG&gt;ObjMsg.Send&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/thread/74788" target="_blank"&gt;Sending Emails using Macro&lt;/A&gt;&lt;/STRONG&gt; - is the post i referred along with many others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to find a reason why it doesnt execute. I am passing the service account user credentials. Can anyone please let me know if there are any other security reasons why my codes doesn't send the email?&lt;/P&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;P&gt;Sub SendReport&lt;/P&gt;&lt;P&gt;ActiveDocument.Sheets("SH01").Activate 'edit the sheet&lt;/P&gt;&lt;P&gt;'ActiveDocument.reload&lt;/P&gt;&lt;P&gt;set objExcel=ActiveDocument.GetSheetObject("TB01") 'edit the sheet object&lt;/P&gt;&lt;P&gt;strDate = Year(Date()) &amp;amp;"-"&amp;amp; month(date()) &amp;amp;"-"&amp;amp; Day(Date())&lt;/P&gt;&lt;P&gt;filepath="E:\Qlikview Documents\Report_"&amp;amp;strDate&amp;amp;".xls"&amp;nbsp;&amp;nbsp; 'edit the location of file&lt;/P&gt;&lt;P&gt;objExcel.ExportBiff filepath&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.Sleep 5000&lt;/P&gt;&lt;P&gt;SendGMail&lt;/P&gt;&lt;P&gt;ActiveDocument.Save&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set objExcel=nothing&lt;/P&gt;&lt;P&gt;set strDate=nothing&lt;/P&gt;&lt;P&gt;set filepath=nothing&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub SendGMail()&lt;/P&gt;&lt;P&gt;MsgBox "Report Exported Successfully"&lt;/P&gt;&lt;P&gt;strDate = Year(Date()) &amp;amp;"-"&amp;amp; month(date()) &amp;amp;"-"&amp;amp; Day(Date()) &lt;/P&gt;&lt;P&gt;filepath="E:\Qlikview Documents\Report_"&amp;amp;strDate&amp;amp;".xls"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set objMsg = CreateObject("CDO.Message")&lt;/P&gt;&lt;P&gt;Set msgConf = CreateObject("CDO.Configuration")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Server Configuration&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;msgConf.Fields.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;") = 2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;msgConf.Fields.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;") = "m************.com" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;msgConf.Fields.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;") = 25&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;msgConf.Fields.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;") = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;msgConf.Fields.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;") = "c***\*****n" 'type your mail id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;msgConf.Fields.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;") = "********" 'Type your account Password&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;msgConf.Fields.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;") = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;msgConf.Fields.Update&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Msgbox("test123")&lt;/P&gt;&lt;P&gt;'End With&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;objMsg.To = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:tomail@domain.com" target="_blank"&gt;tomail@domain.com&lt;/A&gt;&lt;SPAN&gt;" ' type to mail id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;objMsg.From = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:frommail@domain.com" target="_blank"&gt;frommail@domain.com&lt;/A&gt;&lt;SPAN&gt;" 'type from mail id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;objMsg.Subject = "Test mail"&lt;/P&gt;&lt;P&gt;objMsg.HTMLBody = "QlikView Test Mail"&lt;/P&gt;&lt;P&gt;'objMsg.AddAttachment "D:\Image.jpg"&lt;/P&gt;&lt;P&gt;objMsg.AddAttachment&amp;nbsp;&amp;nbsp; filepath&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Attachement object&lt;/P&gt;&lt;P&gt;objMsg.Sender = "Mr. Name"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Msgbox("test4563")&lt;/P&gt;&lt;P&gt;Set objMsg.Configuration = msgConf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Msgbox("send")&lt;/P&gt;&lt;P&gt;' Send&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;objMsg.Send &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Msgbox("test")&lt;/P&gt;&lt;P&gt;Msgbox("Email Sent Successfully")&lt;/P&gt;&lt;P&gt;' Clear&lt;/P&gt;&lt;P&gt;Set objMsg = nothing&lt;/P&gt;&lt;P&gt;Set msgConf = nothing&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;************************************************************************************************************************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86534#M762655</guid>
      <dc:creator>poojask123</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Email Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86535#M762656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might turn on error handling to see what error is being returned by the .Send line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 13:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86535#M762656</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2018-08-01T13:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Email Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86536#M762657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it something that i have to write as part of the code ? I am not very aware of it. Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 13:13:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86536#M762657</guid>
      <dc:creator>poojask123</dc:creator>
      <dc:date>2018-08-01T13:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Email Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86537#M762658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;on error resume next&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;objMsg.Send&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;msgbox err.number &amp;amp; "&amp;nbsp; " &amp;amp; err.description&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 13:19:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86537#M762658</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2018-08-01T13:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Email Macro not working</title>
      <link>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86538#M762659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. The error was with respect to the transport layer and i disabled SSL in the code and it worked fine. Since the mail is been sent within the network, i hope disabling SSL should'nt be a problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2018 09:20:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-Macro-not-working/m-p/86538#M762659</guid>
      <dc:creator>poojask123</dc:creator>
      <dc:date>2018-08-02T09:20:46Z</dc:date>
    </item>
  </channel>
</rss>

