Start a new topic

Business Logic: email doesn't seem to be working

I'm trying to send an email from a collection hook:



logger.info('sending confirmation email to: '+request.body.email);

email.send('noreply@comain.co.uk', request.body.email, 'Booking Confirmation', 'Confirmation for booking '+request.body._id);

logger.info('sent confirmation email to: '+request.body.email);



I can see the log statements, but I never receive the email.



Does this feature work?

Does it require extra setup?



Thanks

Hey Pete- Are you putting this in After Save in your BL code? Try the sample code at http://devcenter.kinvey.com/rest/guides/business-logic#Triggeringemailnotifications and see if that is working.
Hi Caroline,



The code was in the PreSave collection hook, but it appears it will only work in PostSave.



Thanks
Login or Signup to post a comment