I am having a problem attaching a file into an e-mail.
My code (see below) is working fine on a my phone but when I run it on a tablet the attachment is not being selected even though the file exists and I can select it manually.
Dim SendReport As Email
File.WriteString (File.DirDefaultExternal, "JobAttachment.html", "Test")
SendReport.To.Add("test@test.com")
SendReport.Subject = "Test"
SendReport.Body = "See attachment"
SendReport.Attachments.Add(File.Combine(File.DirDe faultExternal, "JobAttachment.html"))
StartActivity(SendReport.GetIntent)
Please try the updated Phone library and see if it fixes this issue. The Intent created is simpler if there is only one attachment.
Example:
B4X:
Dim ei As Email
ei.To.Add("aaa@bbb.com")
ei.Body = "mmmm"
ei.Subject = "aaaaa"
ei.Attachments.Add(File.Combine(File.DirRootExternal, "1.jpg"))
StartActivity(ei.GetIntent)
Thank you very much - updating the phone library solved this issue.
I have two quick questions regarding this issue:
1. How can I make sure I have the latest libraries?
2. Is there a way to send HTML in the E-Mail instead of as attachment?