API error when sending text data from database

On a side note I also found that MailJet transactional templates hate multiline text.
I therefore had to remove line breaks using :find & replace regex string -

/(\r\n)+|\r+|\n+|\t+/i

I found the solution on https://kaspars.net/blog/web-development/regex-remove-all-line-breaks-from-text

Deepak

3 Likes