title: PhoneGap Email Composer Plugin
body: <p>I've built a simple jQuery Mobile based app, and trying to compile it with Phonegap.
  I'd like the users to be able to send some content from the app via email, but I can't figure this out.</p>
  
  <p>My code:</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script type="text/javascript" src="json2.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" charset="utf-8" src="phonegap.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="EmailComposer.js"&gt;&lt;/script&gt; 
  &lt;script src="js/jquery-1.5.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/jquery.mobile-1.0a3.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/jsStuff.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" charset="utf-8"&gt;
  
  // Wait for PhoneGap to load
  //
  function onLoad() {
      document.addEventListener("deviceready", onDeviceReady, false);
  }
  
  // PhoneGap is ready
  //
  function onDeviceReady() {
      // Empty
  }
  
  // alert dialog dismissed
  function alertDismissed() {
      // do something
  }
  
  // Show a custom alert
  //
  function doEmail() {
      window.plugins.emailComposer.showEmailComposer("Subject","PlainTextBody", "recipient,recipient", "ccRecipient", "bccRecipient",false);
  }
  &lt;/script&gt;
  
  &lt;link rel="stylesheet" href="style.css" /&gt; 
  </code></pre>
  
  <p>And then:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;body onload="onLoad()"&gt; 
  &lt;a href="#" onclick="doEmail(); return false;"&gt;Send email&lt;/a&gt;
  </code></pre>
  
  <p>This does nothing at all.</p>
  
  <p>What I've done:</p>
  
  <ol>
  <li>Downloaded the <code>EmailComposer</code> plugin.</li>
  <li>Move <code>EmailComposer.js</code> to the root of my app (Phonegap project -> www).</li>
  <li>Added <code>EmailComposer.h</code> &amp; <code>EmailComposer.m</code> to my project by right-clicking my www folder in Xcode, then "Add" --> "Existing Files..." (REference type: Default, "copy items into destination..." is checked)</li>
  <li>Added <code>MessageUI.framework</code> to my project by right clicking my project's target -> "Get info" and adding it to linked libraries.</li>
  </ol>
  
  <p>Any help would be appreciated.</p>