fipamo/public/assets/scripts/dash/app/actions/Mailer.js
ro eda377aba3
publish site from settings active
with the setting page set up, now the the settings api can be added,
beginning with the ability to render all files from settings.

the base settings api class is set up, so now the rest of the methods
can be added
2024-03-19 15:34:01 -06:00

45 lines
996 B
JavaScript

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