import { EmailComposer } from '@awesome-cordova-plugins/email-composer/ngx';
constructor(private emailComposer: EmailComposer) { }
...
this.emailComposer.getClients().then((apps: []) => {
});
this.emailComposer.hasClient().then(app, (isValid: boolean) => {
if (isValid) {
}
});
this.emailComposer.hasAccount().then((isValid: boolean) => {
if (isValid) {
}
});
this.emailComposer.isAvailable().then(app, (available: boolean) => {
if(available) {
}
});
let email = {
to: 'max@mustermann.de',
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: 'Cordova Icons',
body: 'How are you? Nice greetings from Leipzig',
isHtml: true
}
this.emailComposer.open(email);