2

I'm using a Parse Cloud Job to send e-mails to all our ~1000 of users with Mandrill right now. Currently, I use a Parse.Cloud.httpRequest like so:

 function sendNewsletterWithMandrill(info) {
    var mandrillBody = computeMandrillBodyFromInfo(info); // takes a while per user
    return Parse.Cloud.httpRequest({
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=utf-8'
        },
        url: 'https://mandrillapp.com/api/1.0/messages/send-template.json',
        body: mandrillRequestBody
    });
};

I want test that this implementation runs within the 15 minutes for wall-clock time limit that Parse Cloud Jobs have.

i.e. I want my code to take the time to compute the e-mail body, and actually perform the request, but NOT actually send the e-mail.

How can I achieve this? Cheers.

fatuhoku
  • 4,815
  • 3
  • 30
  • 70

1 Answers1

2

You can create in Mandrill a test api key, it will make the request and give you a positive answer if the email was ok but it will not send the email.

Nick
  • 1,032
  • 16
  • 27