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