Phonegap 电子邮件插件问题
Issue with Phonegap email plugin
我正在构建一个 PhoneGap 跨平台应用程序,我正在尝试使用 cordova 电子邮件编辑器插件。我正在使用在线 Adobe phonegap 构建器构建应用程序。
我正在使用一些示例代码,如下所示,当我构建并且 运行 应用程序告诉我 "is email mobile available? no"
当我按下按钮时 运行s 示例代码会触发此消息,此时我只想看到电子邮件应用程序打开并填充预定义消息。
应用程序构建在 PhoneGap 构建上没有错误,因为我在我的 config.xml 中包含了对插件的引用。
还有什么我想念的吗?
谢谢
此致
{
document.addEventListener('deviceready', function () {
cordova.plugins.email.isAvailable(
function (isAvailable) {
alert("is email mobile available? " + (isAvailable ? "Yes" : "No"));
if(isAvailable){
window.plugin.email.open({
to: 'test@test.com',
subject: 'Greetings',
body: 'How are you? Nice greetings from Leipzig'
}, callback, scope);
}
}
);
}, false);
function callback(){
console.log("callback function");
}
function scope(){
console.log("scope function");
}
Function SentEmail(){
window.plugin.email.isServiceAvailable(function (isAvailable) {
if(isAvailable)
{
window.plugin.email.open({
to: [Your to email address],
cc: [''],
bcc: [''],
subject: "subject,
body: "<br/> your body content",
isHtml: true
});
}
else
Alert('Please add an email account on this device to make email service available.');
}
我正在构建一个 PhoneGap 跨平台应用程序,我正在尝试使用 cordova 电子邮件编辑器插件。我正在使用在线 Adobe phonegap 构建器构建应用程序。 我正在使用一些示例代码,如下所示,当我构建并且 运行 应用程序告诉我 "is email mobile available? no" 当我按下按钮时 运行s 示例代码会触发此消息,此时我只想看到电子邮件应用程序打开并填充预定义消息。 应用程序构建在 PhoneGap 构建上没有错误,因为我在我的 config.xml 中包含了对插件的引用。 还有什么我想念的吗? 谢谢 此致
{
document.addEventListener('deviceready', function () {
cordova.plugins.email.isAvailable(
function (isAvailable) {
alert("is email mobile available? " + (isAvailable ? "Yes" : "No"));
if(isAvailable){
window.plugin.email.open({
to: 'test@test.com',
subject: 'Greetings',
body: 'How are you? Nice greetings from Leipzig'
}, callback, scope);
}
}
);
}, false);
function callback(){
console.log("callback function");
}
function scope(){
console.log("scope function");
}
Function SentEmail(){
window.plugin.email.isServiceAvailable(function (isAvailable) {
if(isAvailable)
{
window.plugin.email.open({
to: [Your to email address],
cc: [''],
bcc: [''],
subject: "subject,
body: "<br/> your body content",
isHtml: true
});
}
else
Alert('Please add an email account on this device to make email service available.');
}