Conversation
|
Please merge |
|
is this working? |
|
Well... the code above works, but I couldn't get the attachments to Gmail app. I tried using react-native-file-provider and added the provider settings to AndroidManifest.xml, but it just doesn't work (spent a whole day trying to get it to work). It seems that Gmail app only accepts attachments from the external storage area.. I gave up and tried react-native-mail-compose. It works for Android, but the file has to be read as base64 string so I'm using react-native-fetch-blob for it (I already had it in my project). |
|
i need to attach pdf's into the gmail app, so you recommend to use react-native-mail-compose? |
|
Yes! Use it with react-native-fetch-blob so you can read the files as base64 encoded strings out of the box. |
|
thx so much :D |
|
It worked for me with Gmail |
|
Please merge this! |
Currently, emails cannot be attached on android unless the attachment is on an external storage. This can be resolved by:
Using a FileProvider such as a react-native-file-provider so that internal files are exposed as contentUri
Code changes in RNMailModule.java to check if the
pathis a URI or a file path