29 lines
691 B
JavaScript
29 lines
691 B
JavaScript
import FipamoAdminAPI from '../../libraries/FipamoAdminAPI';
|
|
import Notficaton from '../ui/Notifications';
|
|
const admin = new FipamoAdminAPI();
|
|
const notify = new Notficaton();
|
|
export default class Mailer {
|
|
//--------------------------
|
|
// constructor
|
|
//--------------------------
|
|
constructor() {}
|
|
//--------------------------
|
|
// methods
|
|
//--------------------------
|
|
sendMail() {
|
|
let mailData = {
|
|
content: 'This is a test email'
|
|
};
|
|
admin
|
|
.sendMail(mailData)
|
|
.then(result => {
|
|
notify.alert(result.message, true);
|
|
})
|
|
.catch(err => {
|
|
notify.alert(err.message, false);
|
|
});
|
|
}
|
|
//--------------------------
|
|
// event handlers
|
|
//--------------------------
|
|
}
|