Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending SMS to multiple recipients fails #3

Open
jacopsd opened this issue Nov 10, 2014 · 0 comments
Open

Sending SMS to multiple recipients fails #3

jacopsd opened this issue Nov 10, 2014 · 0 comments

Comments

@jacopsd
Copy link

jacopsd commented Nov 10, 2014

I am trying to send SMS to multiple recipients, and the message is only sent to the first recipient in the list. The remaining recipients just seem to be ignored.

I am using following (pseudo) code:
def send_sms(group, smstext, self):
clickatell = Clickatell('username','my_password','my_id')
mylist = NUMBERS[group]
clickatell.sendmsg(recipients=mylist,text=smstext)

I have checked with the debugger, my_list actually contains a list of phone numbers (list of strings) as I would expect to be correct.

Seems the function 'url encode' in file urllib.py replaces the ',' between the numbers with '%2C', while the documentation of the clickatell HTTP API, section 3.3 "Send a message" states:

"One can send to multiple destination addresses by delimiting the addresses with commas. The basic parameters required are to (the handset number to which the message is being sent) and text (the content of the message). A maximum of 100 comma separated destination addresses per sendmsg, or quicksend command, are possible, if you are calling the command via a GET, or alternatively, 300 destination addresses if you are submitting via a POST."

So it must be separated by commas. So I guess the bug is here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant