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

Multiple attachments [OUTDATED]

Open adamski opened this issue 7 years ago • 7 comments
trafficstars

Rebased #11 (the first PR for multiple attachments). Tested and working on iOS, and with Android changes from @kneza23

Breaking changes

attachment:{} is now attachments:[], e.g.:

Mailer.mail({
      subject: 'My email with attachments',
      recipients: [],
      body: 'Check this out',
      isHTML: true,
      attachments: [{
        path: this.imageFilePath,  // The absolute path of the file from which to read data.
        type: 'png',   // Mime Type: jpg, png, doc, ppt, html, pdf
      },{
        path: this.audioFilePath,
        type: 'wav',   
      }]
    }, (error, event) => {
      Alert.alert(
        error,
        event,
        [
          {text: 'OK', onPress: () => console.log('OK: Email Error Response')},
        ],
        { cancelable: true }
      )
    });

adamski avatar Dec 11 '17 10:12 adamski

Thanks for the PR. Looks good overall. Will merge soon.

chirag04 avatar Dec 11 '17 12:12 chirag04

when will this be merged? Need the ability to add multiple attachments

adunn511 avatar Mar 09 '18 15:03 adunn511

Good question. @chirag04?

For now you can use my fork https://github.com/adamski/react-native-mail

adamski avatar Mar 09 '18 15:03 adamski

How has this not still been added.. really disappointing.

elmbrent avatar Jan 14 '19 14:01 elmbrent

Woah! Can't believe this is still not possible ... Please Merge!

brandtnewlabs avatar May 31 '19 14:05 brandtnewlabs

What’s the latest with getting support for this merged into a release? Or is there a better fork we all should switch to?

PvanHengel avatar Jul 18 '19 22:07 PvanHengel

Can folks try the latest version and see if this is still an issue?

chirag04 avatar Sep 03 '20 13:09 chirag04