MailComposer example

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?

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

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.

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

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:

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