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