Skip to content

Cloud Code Mandrill with parse server giving error. #1179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vikas230428 opened this issue Mar 24, 2016 · 1 comment
Closed

Cloud Code Mandrill with parse server giving error. #1179

vikas230428 opened this issue Mar 24, 2016 · 1 comment

Comments

@vikas230428
Copy link

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: "xxxxx@gmail.com",
                                  from_name: "pqr",
                                  to: [
                                       {
                                       email: "xxxxxxxxxx@gmail.com",
                                       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

@drew-gross
Copy link
Contributor

Unfortunately we can't support Mandrill specific issues here. If you do find a solution, though, please post it so that others can benefit it. You might have some luck by catching and logging all exceptions, updating your dependencies, and logging more errors from your app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants