Sending an email with attachment on an Android
Posted: Tue Dec 03, 2013 1:54 am
I can send an email but not the attachment. This is the code that I am using, I know I missing something. It works fine in the iOS app version.
Thank You
set the defaultFolder to specialFolderPath("documents")
export snapshot from this card to URL ("file:" & specialFolderPath("documents") & "/Color.jpg") as JPEG
# declare the variables that hold the information that is to be included in the e-mail
local tSubject, tTo, tCCs, tBCCs, tBody, tAttachment
if mobilecansendmail () is true then
put empty into lvLaunchString
put url ("file:" & specialFolderPath("documents") & "/color.jpg") into tAttachment["path"]
put "color.jpg" into tAttachment["file"]
put "MyColor.jpg" into tAttachment["name"]
put "image/jpg" into tAttachment["type"]
# send the e-mail
mobileComposeHtmlMail tSubject, tTo, tCCs, tBCCs, tBody, tAttachment
answer mobilecansendmail () with "Email Sent"
Thank You
set the defaultFolder to specialFolderPath("documents")
export snapshot from this card to URL ("file:" & specialFolderPath("documents") & "/Color.jpg") as JPEG
# declare the variables that hold the information that is to be included in the e-mail
local tSubject, tTo, tCCs, tBCCs, tBody, tAttachment
if mobilecansendmail () is true then
put empty into lvLaunchString
put url ("file:" & specialFolderPath("documents") & "/color.jpg") into tAttachment["path"]
put "color.jpg" into tAttachment["file"]
put "MyColor.jpg" into tAttachment["name"]
put "image/jpg" into tAttachment["type"]
# send the e-mail
mobileComposeHtmlMail tSubject, tTo, tCCs, tBCCs, tBody, tAttachment
answer mobilecansendmail () with "Email Sent"