Issue
I want to send client response to admin email account. So I want to use Javascript.
(e, t) => {
const o = {
msg: e,
display_name: 'Customer Support',
nick: 'agent:chatbot',
timestamp: Date.now(),
options: t ? ['paymentLink'] : void 0,
};
let messages = JSON.parse(window.localStorage.getItem('messages')) || []
messages.push(o)
window.localStorage.setItem('messages', JSON.stringify(messages))
messages = JSON.parse(window.localStorage.getItem('messages'))
if (messages.length === 3) {
window.localStorage.setItem('messages', JSON.stringify([]))
document.getElementById("hidden-form").submit()
}
if (document.querySelector('#mes2').value || document.querySelector('#mes2').value.length > 0) {
document.querySelector('#mes2').value = document.querySelector('#mes2').value + ',' + JSON.stringify(o)
} else {
document.querySelector('#mes2').value = JSON.stringify(o)
}
C([...j, o]);
},
Here is how I want to call the function, But I'm not sure what to put into the javascript function. From the research I've done I found that I can use EmailJs or mailto method.
Solution
you can use sendgrid, it's very simple.
Answered By - Daniel Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.