Hello,
I am facing issue while using expo-mail-composer. I have integrated MailComposer sdk in expo app successfully. But after I ejected to bare react-native app, I integrated expo-mail-composer package. But now it throws exception when I use the attachments option.
Here’s how my mail function looks like.
async emailVotersData(){
try{
if(this.state.working)
return;
this.setState({ working: true });
let fileInfo = await Api.loadGet(Api.exportData(), Object, {type: 'xlsx'}, this.props.authToken);
let localFileInfo = await FileSystem.downloadAsync(`http://${fileInfo.link}`, `${FileSystem.documentDirectory}voters-list.xlsx`);
await MailComposer.composeAsync({
attachments: [localFileInfo.uri],
subject: 'Voters List'
});
}
catch(err){
alert(err.message);
}
finally{
this.setState({ working: false });
}
}
Help would be appreciated.
Regards.