Cordova EmailComposer选项

时间:2012-08-21 20:36:14

标签: iphone cordova

您好我正在使用Cordova EmailComposer插件,其中包含以下内容

Cordova.exec(null, null, "EmailComposer", "showEmailComposer", [args]);

我正在努力的是设置主题和这样的信息。当我更改null值时,它会破坏插件。

由于

3 个答案:

答案 0 :(得分:0)

用法:

// Define the arguments
var args = {
toRecipients : string,
ccRecipients : string,
bccRecipients : string,
subject : string,
body : string,
bIsHtml : boolean
};

答案 1 :(得分:0)

尝试在HTML页面的正文中使用此示例代码。

<body>
        <div class="app">
            <h1>Apache Cordova</h1>
            <div id="deviceready" class="blink">
                <p class="event listening">Connecting to Device</p>
                <p class="event received">Device is Ready</p>
                        <center><button onclick="cordova.exec(null, null, 'EmailComposer', 'showEmailComposer', [args]);">Compose Email</button></center>
            </div>
        </div>
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
        <script type="text/javascript" src="js/EmailComposer.js"></script>

        <script type="text/javascript">
            app.initialize();
            var args = {
                toRecipients :["xyz@yahoo.co.in"],
                ccRecipients :["abc@gmail.com"],
                bccRecipients :["abc@gmail.com"],
                subject :"Hello",
                body : "HI",
                bIsHtml : true
            };

        </script>


    </body>

答案 2 :(得分:-1)

我已通过以下

找到了我的问题的答案
window.plugins.emailComposer.showEmailComposer("Subject","PlainTextBody", "recipient,recipient", "ccRecipient", "bccRecipient",false);