fipamo/src/com/actions/Mailer.js
2021-04-14 18:50:19 -07:00

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
//--------------------------
}