react-native-mail icon indicating copy to clipboard operation
react-native-mail copied to clipboard

Does not work on IOS 14.8.1

Open dungnguyentri3110 opened this issue 3 years ago • 2 comments

Hi guys i have problem with my Project. i use react native mail to send my PDF file to mail. It was work well on Android but on IOS it was show up and gone right away. I dont know why?. Wait yours help, thanks you!

dungnguyentri3110 avatar Jan 06 '22 18:01 dungnguyentri3110

Same thing on ios 15.6

stephen-jackson-tfs avatar Aug 15 '22 17:08 stephen-jackson-tfs

Put Mailer.mail() in setTimeout and provide some delay.

setTimeout(() => { Mailer.mail( { subject: 'subject', recipients: ['[email protected]'], ccRecipients: ['[email protected]'], bccRecipients: ['[email protected]'], body: 'Body', isHTML: true, attachments: [ { // Specify either path or uri to indicate where to find the file data. // The API used to create or locate the file will usually indicate which it returns. // An absolute path will look like: /cacheDir/photos/some image.jpg // A URI starts with a protocol and looks like: content://appname/cacheDir/photos/some%20image.jpg // path: data?.url, // The absolute path of the file from which to read data. uri: data?.url, // The uri of the file from which to read the data. // Specify either type or mimeType to indicate the type of data. type: data?.fileType, // Mime Type: jpg, png, doc, ppt, html, pdf, csv mimeType: '', // - use only if you want to use custom type name: '', // Optional: Custom filename for attachment }, ], }, (error, event) => { console.log('Mailer --- ', error); }, ); }, 1000);

ashishVerma2216 avatar Mar 27 '23 10:03 ashishVerma2216