Email Js public key
Closed this issue · 1 comments
devgojokotech commented
I am setting the up the emailjs service, with gmail as the service in an angular application.
As per the documentation below is the code to work:
var templateParams = {
name: 'James',
notes: 'Check this out!'
};
emailjs.send('<YOUR_SERVICE_ID>','<YOUR_TEMPLATE_ID>', templateParams)
.then(function(response) {
console.log('SUCCESS!', response.status, response.text);
}, function(err) {
console.log('FAILED...', err);
});
But it should be
var templateParams = {
name: 'James',
notes: 'Check this out!'
};
emailjs.init('<YOUR_PUBLIC_KEY>');
That is available on https://dashboard.emailjs.com/admin/account
emailjs.send('<YOUR_SERVICE_ID>','<YOUR_TEMPLATE_ID>', templateParams)
.then(function(response) {
console.log('SUCCESS!', response.status, response.text);
}, function(err) {
console.log('FAILED...', err);
});
xr0master commented
Hi, thank you for making our service better.
Please note that you are just providing an example, you may find the exact syntax in the documentation.