hypery2k / cordova-email-plugin

Edit and send email messages
Apache License 2.0
44 stars 29 forks source link

issue with sending Attached Email #61

Open stenrdj opened 7 years ago

stenrdj commented 7 years ago

Hey , i was trying to create a csv file using Cordova Plugin file , and send it using Email Composer , unfortunately i didnt succeed to make it work ! let email = { to: 'me@gmail.com', attachments: [fileURI], subject: "Subject", body: "Tatata", isHtml: true }; this.emailComposer.open(email); Log: 2017-05-16 10:34:07.983915+0100 AppTech[7192:2804658] Start Creating file ///////// 2017-05-16 10:34:07.988542+0100 AppTech[7192:2804658] Finish Writing file 2017-05-16 10:34:07.988634+0100 AppTech[7192:2804658] Start Email Composer ///////// 2017-05-16 10:34:07.988685+0100 AppTech[7192:2804658] File in the attatchment: 2017-05-16 10:34:07.988731+0100 AppTech[7192:2804658] Start Email Composer 2017-05-16 10:34:07.991759+0100 AppTech[7192:2804658] End Email Composer 2017-05-16 10:34:07.999414+0100 AppTech[7192:2804711] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2017-05-16 10:34:08.000046+0100 AppTech[7192:2804711] [MC] Filtering mail sheet accounts for bundle ID: com.ionicframework.pharma974580, source account management: 1 2017-05-16 10:34:08.034734+0100 AppTech[7192:2804711] [MC] Result: YES 2017-05-16 10:34:08.035590+0100 AppTech[7192:2804658] [MC] Filtering mail sheet accounts for bundle ID: com.ionicframework.app299580, source account management: 1 2017-05-16 10:34:08.037174+0100 AppTech[7192:2804658] [MC] Result: YES 2017-05-16 10:34:08.089446+0100 AppTech[7192:2804658] File not found: 2017-05-16 10:34:08.099175+0100 AppTech[7192:2804658] *** Assertion failure in -[MFMailComposeInternalViewController addAttachmentData:mimeType:fileName:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/MessageUI/MessageUI-1770.3.19/Mail/MFMailComposeInternalViewController.m:744 2017-05-16 10:34:08.103901+0100 AppTech[7192:2804658] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[MFMailComposeInternalViewController addAttachmentData:mimeType:fileName:] attachment must not be nil.' *** First throw call stack: (0x18796afd8 0x1863cc538 0x18796aeac 0x188402710 0x19451585c 0x1001a419c 0x1001a3170 0x1001a25ac 0x100381a50 0x100381a10 0x100386b78 0x1879190c0 0x187916cdc 0x187846d94 0x1892b0074 0x18daff130 0x100017418 0x18685559c)

Any help please?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/45242114-issue-with-sending-attached-email?utm_campaign=plugin&utm_content=tracker%2F12875371&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F12875371&utm_medium=issues&utm_source=github).
Alexandre-cibot commented 7 years ago

@stenrdj , I'm getting same issue ... more than a year after you. Maybe you have find the solution ?

stenrdj commented 7 years ago

Heey @Alexandre-cibot , unfortunately with the plugin NO! i used an Email api (Mailjet) to send email with attached file :/