I am using Twillio API, to send WhatsApp Messages.
But the Message template needs to be pre-approved in order to send a message.
But It always fails when there are multiple lines of the message.
The reason is they match the new line as n, as the template is registered with a Unix-style line feed in their system, but My template is sending rn
encoding for the new line which is window based.
How can I change newline encoding from rn
to n
in my system?
Thanks in advance for any help.
2
Answers
Resolved this issue using the below code.