yeyintkoko / react-native-sms-x

Apache License 2.0
44 stars 33 forks source link

multiples number phone #13

Open hosval29 opened 5 years ago

hosval29 commented 5 years ago

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

abdul-rightapps commented 4 years ago

Any Way to send multiple smses?

pandevim commented 3 years ago

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)