0

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

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

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

谢谢

4

3 回答 3

0

用法:

// Define the arguments
var args = {
toRecipients : string,
ccRecipients : string,
bccRecipients : string,
subject : string,
body : string,
bIsHtml : boolean
};
于 2012-10-18T13:52:40.157 回答
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>
于 2013-07-09T05:35:36.543 回答
-1

我找到了以下问题的答案

window.plugins.emailComposer.showEmailComposer("Subject","PlainTextBody", "recipient,recipient", "ccRecipient", "bccRecipient",false);
于 2012-08-23T15:02:38.607 回答