1 Reply Latest reply: Jan 13, 2015 5:28 AM by Rajni Batra RSS

    Image Load in mail body issue in Iphone

    Rajni Batra

      Hi All,


      I am sending screen shots in mail body . its working fine for desktop version but in Iphone images are not getting displayed.

      every time i need to download image.


      Any suggestion??


      function SendMail_HD()



      Dim objEmail

      Const cdoSendUsingPort = 2  ' Send the message using SMTP

      Const cdoAnonymous = 0  'Do not authenticate

      Const cdoBasic = 1  'basic (clear-text) authentication

      Const cdoNTLM = 2  'NTLM

      Const SMTPServer = ""   'suzndexc.      'Server Address

      Const SMTPPort =    25       ' Port number for SMTP

      Const SMTPTimeout = 60       ' Timeout for SMTP in seconds



      'Sending mail

      Set objEmail = CreateObject("CDO.Message")



      'Set objOutlkAttach = CreateObject("Outlook.Application")

      'Set objMailAttach = objOutlkAttach.createitem(olMailItem)




      strDate =ActiveDocument.Variables("Vtoday").GetContent

      Set objBP1 = objEmail.AddRelatedBodyPart("D:\Daily2.Jpg", "Daily2.Jpg", CdoReferenceTypeName)

      Set objBP2 = objEmail.AddRelatedBodyPart("D:Daily3.Jpg", "Daily3.Jpg", CdoReferenceTypeName)

      Set objBP3 = objEmail.AddRelatedBodyPart("D:\Daily4.Jpg", "Daily4.Jpg", CdoReferenceTypeName)

      'adds image 1 to the email body

      objBP1.Fields.Item("urn:schemas:mailheader:Content-ID") = "<Daily2.Jpg>"


      objBP2.Fields.Item("urn:schemas:mailheader:Content-ID") = "<Daily3.Jpg>"


      objBP3.Fields.Item("urn:schemas:mailheader:Content-ID") = "<Daily4.Jpg>"




      Set objConf = objEmail.Configuration

      Set objFlds = objConf.Fields

      With objFlds


          ' SMTP server details

          .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort

          .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer

          .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

          .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTPPort

        .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

          .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = SMTPTimeout



      End With



      objEmail.From = "Erika.gupta@***.com"

      objEmail.To = "rajni.batra@***.com"

      objEmail.Subject = "ETB Daily Dashboard "&strDate.String&""


      'objEmail.TextBody = "message"



      objEmail.HtmlBody = "Dear Sir / Madam, <br><br> Please find the attached brief snapshot of ETB Daily Dashboard  as on "&ActiveDocument.Evaluate("date(today(),'DD-MMM-YYYY')")&" <br><br><img src=Daily2.Jpg><br><img src=Daily3.Jpg><br><img src=Daily4.Jpg><br><br>This is a system generated mail please dont Reply <br><br>Regards, <br>Qlikview Team."














      Set objFlds = Nothing

      Set objConf = Nothing

      Set objEmail = Nothing



      end function