Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

rajni_batra
Valued Contributor

Image Load in mail body issue in Iphone

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)

'image1

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>"

objBP1.Fields.Update

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

objBP2.Fields.Update

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

objBP3.Fields.Update

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

    .Update

'---------------------------------------------------------------------

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."

objEmail.Send

ActiveDocument.Save

ActiveDocument.GetApplication.Quit

Set objFlds = Nothing

Set objConf = Nothing

Set objEmail = Nothing

end function

1 Reply
MVP & Luminary
MVP & Luminary

Re: Image Load in mail body issue in Iphone

I think it hasn't to do with the generating from the mail. I assume the reason are settings within the iphone - blocked pictures or not using full-html style to shows mails or ...

- Marcus