Split SMTP API JSON into lines under 1000 chars

According with section Requirements and Limitations from http://sendgrid.com/docs/API_Reference/SMTP_API/ the JSON need to be splitted into lines under 1000 characters. 
When ActionMailer detect white spaces wraps it automatically.