3.0.1 • Published 1 year ago
ma-notification-center v3.0.1
ma-notification-center version 3.0
ma-notification-center is a package to be used by mobilearts to send internal notifications via sms, email or telegram. using aws-sdk v3
new updated package handles emails up to 2GB
Functions
- sendEmail()
- sendTelegram()
- sendSMS()
- sendTelegramPhoto()
- sendTelegramDocument()
Installation
Install the dependencies.
cd yourpath
npm i ma-notification-center
Usage
After installation add requirment to your code
const notifications =require('ma-notification-center');
For Email
/*to_emails, cc_emails and bcc_emails are arrays*/
notifications.sendEmail(to_emails,cc_emails,bcc_emails,subject,text_body,text_html)
For Telegram
/*chat_ids is an array*/
notifications.sendTelegram(chat_ids,text)
For Telegram Photos
/*chat_ids is an array*/
notifications.sendTelegramPhoto(chat_ids, imageurl, caption)
For Telegram Documents
/*chat_ids is an array*/
notifications.sendTelegramDocument(chat_ids, documenturl, caption)
For SMS
/*phonenumbers is an array*/
notifications.sendSMS(source, phonenumbers, text)