本文整理汇总了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);
}
});
}
}