MailComposer example

#1

Hello,

I am trying to understand the docs about MailComposer. Does the attachment array actually download the file and attach it to the email for example images? If so there aren’t any examples. Can someone provide some sample code about this?

#2

Hi @rush86999 - as far as I’m aware, the attachments array must be a local file uri (a file already downloaded to the device). You should be able to use the FileSystem API to get such a uri. @aalices may be able to provide some more clarification.

1 Like
#3

Hello, yes - @esamelson is right. You have to provide Uris of local files that could be receiver for example by using ImagePicker or Asset.downloadAsync. Please let me know if you still need a snack with a whole example.

MailComposer Attachments not working (android)
#4

Ok, thanks. i just realized you need sdk 25 for it to work. For some reason I can’t get debug remotely to work after upgrading to 25 from 24 so i had to downgrade but I should be okay with what you mentioned. I will try it once I figure out how to upgrade.

thanks for the help

#5

Oh yes, the debugger issue is actually a RN issue: https://github.com/facebook/react-native/issues/17618
hope they fix it completely soon :slight_smile:

closed #6

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.