2021-04-14 18:50:19 -07:00
|
|
|
import FipamoAdminAPI from "../../libraries/FipamoAdminAPI";
|
|
|
|
import Notficaton from "../ui/Notifications";
|
2020-07-02 13:34:39 -07:00
|
|
|
const notify = new Notficaton();
|
2019-11-21 22:36:18 -08:00
|
|
|
export default class Mailer {
|
2021-04-14 18:50:19 -07:00
|
|
|
//--------------------------
|
|
|
|
// 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
|
|
|
|
//--------------------------
|
2019-11-21 22:36:18 -08:00
|
|
|
}
|