I have been using the sendgrid-ruby gem for sending emails. The subject of the email doesn't decode special characters properly.
Eg. Sending this subject for the email How's it going
translates to this in the actual email How's it going
I have tried encoding the string for subject to different formats such as ASCII, ISO_8859_1 but none of this works.
@body_json['personalizations'][0]['dynamic_template_data'] = {
'email_title': @email_title,
'content': @description,
'subject': "How's it going"
}
SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY']).client.mail._('send').post(request_body: @body_json)
The subject for email should show special characters correctly such as ' & :