I am facing an issue where I am receiving a "ReferenceError: doNotification is not defined" message when attempting to display a pop-up notification upon successful promise. Oddly enough, triggering doNotification on button click within my HTML works without any errors. Additionally, my email function seems to be functioning correctly, as the console.log outputs the expected parameters. I'm unsure why I'm encountering this error specifically when trying to call doNotification from within my email function?
export default {
methods: {
sendEmail: (e) => {
emailjs.sendForm('gmail', 'template', e.target, 'user')
.then((result) => {
console.log('SUCCESS!', result.status, result.text);
doNotification();
}, (error) => {
console.log('FAILED...', error);
});
e.target.reset();
},
doNotification() {
this.$toast.success("Your message has been sent!", {
position: "bottom-right"});
}}}