I'm testing the application on Android V4.1.2.
I'm trying to send a log file along with a support e-mail message. Here is my code.
Code: Select all
function emailSupport
put empty into tLogFileName
-- Define the file name of the LOG FILE
if the environment = "mobile" then
set the defaultFolder to specialFolderPath( "documents" )
else
set the defaultFolder to specialFolderPath( "temporary" )
end if
put defaultFolder into tLogFileName
put "/SaverHealth/STATlog.txt" after tLogFileName
-- Define the Attachment Array with an attached file
--put "text/plain" into tAttachment["type"]
--put tLogFileName into tAttachment["file"]
-- Test with basic data imput string
put "This is a text data that is being attached to a support message" into tAttachment["Data"]
put "text/plain" into tAttachment["type"]
put "STATlog.txt" into tAttachment["name"]
-- Define the eMail Details
put "Support@SaverHealth.com" into toText
put "Support" into subjectText
put fld "message" into bodyText
if environment() is "mobile" then
mobileComposeMail subjectText, toText, , , bodyText, tAttachment
end if
end emailSupport
HOWEVER when I send the message, I get an error Couldn't send attachment
I originally thought that it was because the attached file was a GZIP file, so I changed the file format to plain text file and that still failed.
SO I tried just sending a simple data string as shown above. It fails as well.
I'm sure there are others attaching data to an e-mail. What is going on???? This should send an attachment.
Thanks for the help.
dcpbarrington