简体   繁体   中英

How to send email using mail composer plugin in iphone using phone gap jQuery mobile

I have implemented an app using jQuery Mobile in PhoneGap (corDova).

I have down loded the EmailComposer plugin for sending email.

I added EmailCompser.js in my www folder and EmailCompser.h, EmailCompser.m in resource folder of application.

I have created a button in jQuery mobile.

Now i want to populate mail composer view when click on the Mail button

<a href="???" data-icon="arrow-r" data-iconpos="left" class="ui-btn-left" >E-MAIL</a>

It will not open on click of a link unless you write the cordova code to initiate the plugin, try this:

<script type="text/javascript">
function openMail(){
  var args;
  Cordova.exec(null, null, "EmailComposer", "showEmailComposer", [args]);
}
</script>

<a href="#" onclick="openMail()" data-icon="arrow-r" data-iconpos="left" class="ui-btn-left" >E-MAIL</a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM