mobileComposeHtmlMail attaching image into html problem

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
goharika
Posts: 4
Joined: Fri Oct 03, 2014 12:40 pm

mobileComposeHtmlMail attaching image into html problem

Post by goharika » Thu Jul 14, 2016 1:58 pm

Hello All,

We are trying to attach an image in an HTML email and use mobileComposeHtmlMail to send them on mobile devices. Here is the code. It send s the email, but the images are NOT attaching. We tried base64 encoding, but that did not work. We are on a tight deadline and can't get this to work.

Help is MUCH appreciated.

-->HTML Code

-- Put image cid

put "<img src='cid:myimagecid'/> " after tBody

-->HTML Code

-- Get image binary data

put getGraphImage() into tChartImg

-- Put image binary data into attachment

put tChartImg into tAttachment[1]["data"]

-- Put image type into attachment

put "image/png" into tAttachment[1][["type"]

-- Put image name into attachment

put "myimagecid.png" into tAttachment[1][["name"]

put "myimagecid" into tAttachment[1][["cid"]

-- Pass tAttachment parameter to mobileComposeHtmlMail function

mobileComposeHtmlMail tSubject, tSendTo, , ,tBody, tAttachment



Thanks Gohar

Post Reply

Return to “Talking LiveCode”