Forum Xamarin.Forms

CrossMessaging.Current.EmailMessenger >> Android with Attachment

I'm trying to use the cross messaging plugin to send emails, but I need a PDF attachment too.

On iOS everything is working fine - Outlook pops up, has my subject, body and attachment, sends perfectly.

On Android it works with NO attachment, but when I want to attach a PDF file I get an exception.

Here's the code

var email = new EmailMessageBuilder()
                 .To("[email protected]")
                 .Subject("Test Subject")
                 .Body("Body Goes Here")
                 .WithAttachment(FileName, "application/pdf")

 var emailMessenger = CrossMessaging.Current.EmailMessenger;

I'm passing a filename of


The error I'm getting is:

Failed to find configured root that contains /data/data/{MyAppName}/files/report.pdf

Notice the extra /data prepended.

Is this an access permission for the other app trying to access my app's data (works on iOS but not Android)? If so where could/should I try to put the file instead in order to send it?

Is there something else I've missed?


Sign In or Register to comment.