{type: 'GET_SERVICE_TICKET',data: {CounterNumber: 13,TicketNumber: 1200}}
HÀM React gửi email tự động------------------------------handleSentEmail = (e) => { e.preventDefault() if (!this.validateEmail()){ return } const { company, firstname, lastname, email, content } = this.state var templateParams = { to_name: 'WEE_DIGITAL', message_html: content, representative_name: firstname + ' ' + lastname, from_name: company, reply_to: email, } window.emailjs.send( 'gmail', 'template_fJd1hGHL', templateParams, 'user_ssva2y8HfbM0YDUb1uWHT', ) .then(responce => { toastr.success('Email sent successfull') console.log('Email successfully sent!',responce) }) .catch(err => { toastr.error('Email sent failed') console.error('Oh well, you failed. Here some thoughts on the error that occured:', err) }) setTimeout(() => { this.props.showPopupContact() this.handleCancel() }, 1000); }
{
Trả lờiXóatype: 'GET_SERVICE_TICKET',
data: {
CounterNumber: 13,
TicketNumber: 1200
}
}
HÀM React gửi email tự động
Trả lờiXóa------------------------------
handleSentEmail = (e) => {
e.preventDefault()
if (!this.validateEmail()){
return
}
const { company, firstname, lastname, email, content } = this.state
var templateParams = {
to_name: 'WEE_DIGITAL',
message_html: content,
representative_name: firstname + ' ' + lastname,
from_name: company,
reply_to: email,
}
window.emailjs.send(
'gmail',
'template_fJd1hGHL',
templateParams,
'user_ssva2y8HfbM0YDUb1uWHT',
)
.then(responce => {
toastr.success('Email sent successfull')
console.log('Email successfully sent!',responce)
})
.catch(err => {
toastr.error('Email sent failed')
console.error('Oh well, you failed. Here some thoughts on the error that occured:', err)
})
setTimeout(() => {
this.props.showPopupContact()
this.handleCancel()
}, 1000);
}