Guest User

Untitled

a guest
Mar 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. // Send SMS notification
  2. function sendSMS(message){
  3. twilioClient.messages.create({
  4. to: process.env.MY_NUMBER,
  5. from: process.env.TWILIO_SMS_NUMBER,
  6. body: message
  7. })
  8. .then(msg => {
  9. // Log the message from Twilio
  10. console.log(msg);
  11. })
  12. .catch(err => {
  13. console.error(err);
  14. })
  15. .done();
  16. }
Add Comment
Please, Sign In to add comment