Closed
Description
The other simple cloud functions are working fine after push from 'cloud/main.js' to heroku server
But when I add mandrill script it gives an error on app end as:
[Error]: Invalid function. (Code: 141, Version: 1.13.0)
I have installed Mandrill version '~0.1.0' into parser-server-example folder after adding the mandrill version into package.json file and push the code to heroku. But still the issue is same. Here is my cloud code:
`Parse.Cloud.define("sendMail", function(request, response) {
var Mandrill = require('mandrill');
Mandrill.initialize('xxxxxxxxxx');
Mandrill.sendEmail({
message: {
text: "ffff",
subject: "hello",
from_email: "[email protected]",
from_name: "pqr",
to: [
{
email: "[email protected]",
name: "trump"
}
]
},
async: true
},{
success: function(httpResponse) {
console.log(httpResponse);
response.success("Email sent!");
},
error: function(httpResponse) {
console.error(httpResponse);
response.error("Uh oh, something went wrong");
}
});
});`
Please let me know if there is anything wrong?
I have tried to install mandrill latest version but parse server does not installing the versions other than ~0.1.0
Metadata
Metadata
Assignees
Labels
No labels