本文整理匯總了TypeScript中ionic-native.EmailComposer.isAvailable方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript EmailComposer.isAvailable方法的具體用法?TypeScript EmailComposer.isAvailable怎麽用?TypeScript EmailComposer.isAvailable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ionic-native.EmailComposer
的用法示例。
在下文中一共展示了EmailComposer.isAvailable方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: sendMail
sendMail() {
EmailComposer.isAvailable().then((available) =>{
if(available) {
//Now we know we can send
}
});
let email = {
to: 'airing@ursb.me',
// cc: 'erika@mustermann.de',
// bcc: ['john@doe.com', 'jane@doe.com'],
attachments: [
// 'file://img/logo.png',
// 'res://icon.png',
// 'base64:icon.png//iVBORw0KGgoAAAANSUhEUg...',
// 'file://README.pdf'
],
subject: 'Sunnybaby晴寶 反饋',
body: '請在正文輸入您的反饋!謝謝。',
isHtml: true
};
// Send a text message using default options
EmailComposer.open(email);
}
示例2: isAvailable
isAvailable() {
EmailComposer.isAvailable().then((available) => {
console.log(available);
if (available) {
//Now we know we can send
}
});
}
示例3:
handler: ()=> {
EmailComposer.isAvailable().then((available) => {
let email = {
to: 'hello@ralphowino.com',
isHtml: true
};
if (available) {
EmailComposer.open(email);
}
});
}
示例4: sendEmail
sendEmail() {
EmailComposer.isAvailable().then((available) => {
let email = {
to: this.to,
subject: this.subject,
body: this.body,
isHtml: true
};
if (available) {
EmailComposer.open(email);
}
});
}
示例5: sendEmail
sendEmail() {
if (window.cordova) {
EmailComposer.isAvailable().then((available:boolean) => {
if (available) {
let email = {
to: "h@phodal.com",
cc: "gmszone@qq.com",
subject: "Growth反饋",
body: "我希望可以有:",
isHtml: true
};
EmailComposer.open(email);
}
});
}
}