yeyintkoko/react-native-sms-x

multiples number phone

Opened this issue · 2 comments

Cuando sale la versión para enviar a varios números telefónicos

Any Way to send multiple smses?

You can call the SendSMS multiple times and put that in a utility function.

const sendMultipleSMS = (contacts) => {
  contacts.map(contact => {
    SendSMS.send(parseFloat(contact.id), contact.number, `Hi ${contact.name}`, success => {
      console.log('Message Sent Successfully')
    })
  })
}
const contacts = [
  {
    id: "1",
    name: "name",
    number: "00000000000"
  },
  {
    id: "2",
    name: "name",
    number: "00000000000"
  },
]

sendMultipleSMS(contacts)