Android Question android 11+ send email with attachment

astrowizzle

New Member
Hi guys

i need some help here. I have inherited some b4a apps that i am trying to get working in android 11 plus
The problem i am having is sending email with attachements.

they are using the email object to do it.
When i send them and choose samsung email as the mail client they work fine.
When i try and select the outlook client they send fine without the attachment, but fail with the attachment.

This is the code that the aps are using:

Dim EMessage As Email
EMessage.To.Add("[email protected]")
EMessage.Subject = "Completed Inspection"
Dim s As String
s=File.Combine(File.DirRootExternal & "/ESC Projects/Inspections/Archived", lst.Get(b) & ".insp")
EMessage.Attachments.Add(s)
EMessage.Body = lblName.Text & " has completed ESC Inspection - " & lst.Get(b) & ".insp"
StartActivity(EMessage.GetIntent)

Any help would be greatly appreciated.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please use [code]code here...[/code] tags when posting code.

 
Upvote 0
Top