0

I have a mobile app, and the database is hosted on back4app (parse database). I have a class called ChatRooms and the object is isReported. I would like to send myself an email when isReported = True.

I would like to use php to do this if all possible. I'm really not sure how to setup the phpSDK for parse.

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
  • There is a mail function in PHP use that? Not sure about this back4App thing. Tried there community support? https://groups.google.com/forum/#!forum/back4app – Richard Housham Apr 05 '17 at 14:47
  • In wich programming language you can write code for parse DB??? – BetaDev Apr 05 '17 at 14:48
  • I want to write the code in php – Orange Training Apr 05 '17 at 14:49
  • Once I can use php to connect to the parse database, then I can use the mail function @RichardHousham – Orange Training Apr 05 '17 at 14:50
  • But my point is just write a trigger method in your programming language, I mean the programming language which you can easily access and check DB parameter (isReported). In that method call a remote PHP file or URL (Like RESTful API) to send email. and to send email just use simple PHP function mail() using your SMTP. – BetaDev Apr 05 '17 at 14:51
  • why you want PHP, just to send email??? If yes then write email logic using php (accessible via URL) and check DB value using your programming language and call REST API (URL/PHP hosted location) to send . – BetaDev Apr 05 '17 at 14:54
  • It is far away easier you do it using Back4app cloud code (http://docs.back4app.com/docs/integrations/) instead of running a PHP only for this. Create a afterSave trigger to the ChatRooms class (http://docs.parseplatform.org/cloudcode/guide/#aftersave-triggers), check the value of isReported and use for example SendGrid to send the e-mail (http://docs.back4app.com/docs/integrations/using-sendgrid-to-send-email/). – Davi Macêdo Apr 27 '17 at 17:14

0 Answers0