911 - We are having problems attaching an image on mobileComposeHtmlMail

Todd Fabacher tfabacher at gmail.com
Thu Jul 14 08:26:29 EDT 2016


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 Todd & Team



More information about the use-livecode mailing list