Hi There,
I have been using the Mandrill service to send email from the app with ajax. it works well as expected when from the app.
however I need to schedule a service script on daily basis, I have checked the Mandrill website. the API in nodejs looks like :
Code: Select all
var mandrill = require('mandrill-api/mandrill');
var mandrill_client = new mandrill.Mandrill('..... myKey .....');
var message = {
"html": msg,
"subject": '....blablabla....',
"from_email": "noReply@........io",
"to": [{
"email": query3.email,
"name": query3.username,
"type": "to"
}],
};
the error msg says that "require" is not defined.
would you have the proper code in server code to replace that "require" ?
looking forward to receiving you smart advice as usal !
Eric