Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Send SMS notification
- function sendSMS(message){
- twilioClient.messages.create({
- to: process.env.MY_NUMBER,
- from: process.env.TWILIO_SMS_NUMBER,
- body: message
- })
- .then(msg => {
- // Log the message from Twilio
- console.log(msg);
- })
- .catch(err => {
- console.error(err);
- })
- .done();
- }
Add Comment
Please, Sign In to add comment