Skip to content

Instantly share code, notes, and snippets.

@robbiet480
Created August 4, 2013 01:55
Show Gist options
  • Save robbiet480/6148742 to your computer and use it in GitHub Desktop.
Save robbiet480/6148742 to your computer and use it in GitHub Desktop.
var footer = "\r\n\r\nU can say STATUS 4 status, ON 2 turn on msgs, OFF 2 turn off. Pwred by BARTStriking.com & Twilio.com";
@crtr0
Copy link

crtr0 commented Aug 4, 2013

Hey Robbie, what's the context? Is this for an SMS?

@kwhinnery
Copy link

Hey man,

Just tried the following, which works on the latest version of the library:

var c = require('twilio')();

c.sendSms({
    to:'+1651XXXYYYY',
    from:'+1612XXXYYYY',
    body:'\r\n\r\nU can say STATUS 4 status, ON 2 turn on msgs, OFF 2 turn off. Pwred by BARTStriking.com & Twilio.com'
}, function(err, data) {
    console.log('Error: '+err);
    console.log('data: '+data);
});

Can you provide a bit more context?

@robbiet480
Copy link
Author

Hey,

Yeah it's for SMS. I just want to append that string to the end of every SMS (I know how to do that). But, it doesn't seem to correctly encode the characters. However, when I view the .json of the message on the Twilio URL, it has the \r\n characters. So, it's getting there, but someone, somewhere, isn't processing it correctly.

@kwhinnery
Copy link

So the message is being sent, but the newline characters are being printed as-is in the message? On AT&T not observing that behavior. If you have code that can duplicate that would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment