I'm using postmark to send emails in my rails application where the email content is auto generated. The thing is that in some cases I getting this error from postmark.
Postmark::InvalidEmailAddressError
Invalid 'HtmlBody' value. It should be less than 5242880 characters in length.
How can I truncate the HtmlBody content in order to avoid this error using ActionMailer