taljacobson / flutter_mailer

A wrapper on top of MFMailComposeViewController from iOS and Mail Intent on android
MIT License
47 stars 39 forks source link

Attachment path get mangled. #22

Closed chrislaurie-io closed 4 years ago

chrislaurie-io commented 4 years ago

My storage class returns a path to my file as:

/data/user/0/...

Which I pass directly in the attachments property.

The mail fails with this error:

PlatformException(error, Failed to find configured root that contains /data/data/...

Samsung Galaxy S7

taljacobson commented 4 years ago

you might want to check out path_provider.

the example app has usage for using it for creating a local file https://github.com/taljacobson/flutter_mailer/blob/master/example/lib/main.dart#L225

issue #10 has some examples of how it might work.

taljacobson commented 4 years ago

closing in favor of #10. since it seems like a problem of android configuration and attachment path.