B4J Question Insert an Image into an email's body

Christos Dorotheou

Member
Licensed User
Longtime User
Hi everybody

I am trying to send an email from within my Application, using the default email client application (MS Outlook) on a pc with the fx.ShowExternalDocument subroutine.

It works perfectly good as far as mailto:, subject and text in the body is concerned
but I need to insert in the email's body, an image of a canvas snapshot from within my code.

I will greatly appreciate any suggestions as to how I can implement this request.


B4X:
Sub ShowMailClient(Address As String, Subject As String, BodyText As String)

fx.ShowExternalDocument($"mailto:${Address}&subject=${Subject}&body=${BodyText}"$)

End Sub
 

eurojam

Well-Known Member
Licensed User
Longtime User
I would try to put HTML Text into the body and embed the image as base64 encoded string. Encoding can be done with StringUtils...

best
Stefan
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…