Reputation: 57
I am trying to send an email on PhoneGap. I've seen a few different EmailComposer plugins, but I wanted to see if there was a simpler way to send an email without a plugin. I've tried using the mailto command like this:
<a href="mailto:[email protected]?Subject=Hello">Send Mail</a>
When I run this on the iPhone simulator and click on the link I get this message in the console log:
AppDelegate::shouldStartLoadWithRequest: Received Unhandled URL mailto:[email protected]?Subject=Hello%20again
Is it possible to use the mailto command to send an email or do I need to use a plugin? If I can use the mailto command what can I change to make it work? Also, what would be the advantage to using a plugin versus the mailto command?
Thank you in advance!
Upvotes: 1
Views: 2364
Reputation: 1277
I myself wanted to send a mail from a phonegap app and didnt want to go for a plugin. So I have thought of this solution to send a mail.
I will share the code, if this works, as soon as I am done with it.
Upvotes: 0
Reputation: 1028
You need to use the phonegap plugin EmailComposer .
Mailto command won't work on all platforms. That's the reason why this plugin is mostly used.
All the guidelines to use it can be found at it's readme.txt
Upvotes: 1