本文整理汇总了TypeScript中ionic-native.EmailComposer类的典型用法代码示例。如果您正苦于以下问题:TypeScript EmailComposer类的具体用法?TypeScript EmailComposer怎么用?TypeScript EmailComposer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EmailComposer类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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:
EmailComposer.isAvailable().then((available) => {
let email = {
to: 'hello@ralphowino.com',
isHtml: true
};
if (available) {
EmailComposer.open(email);
}
});
示例4:
EmailComposer.isAvailable().then((available) => {
let email = {
to: this.to,
subject: this.subject,
body: this.body,
isHtml: true
};
if (available) {
EmailComposer.open(email);
}
});
示例5:
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);
}
});
示例6: open
open() {
let email = {
to: 'max@mustermann.de',
cc: 'erika@mustermann.de',
bcc: ['john@doe.com', 'jane@doe.com'],
attachments: [],
subject: 'Cordova Icons',
body: 'How are you? Nice greetings from Leipzig',
isHtml: true
};
// Send a text message using default options
EmailComposer.open(email);
}