drewr/postal

setSubject is not setting charset

terjesb opened this issue · 1 comments

Norwegian characters (æøå) in the subject are shown as "?" in Gmail. When used in the body, they are shown okay. Sending to Gmail through SendGrid.

skjermbilde 2013-09-11 kl 16 29 39

                           {:from from
                            :to email
                            :subject "Test æøå"
                            :charset "utf-8"
                            :body [{:type "text/html; charset=utf-8"
                                    :content "Test æøå"}]}))))

I built a local version that adds charset to the setSubject call:

terjesb@00529b1

This fixes it for me. Not sure why all the other calls use charset and setSubject does not?

The existing tests still pass, but I haven't been able to make a test specifically for utf-8. Locally on OS X, the current tests seem to work with utf-8 as-is.

It's an oversight. Subject should definitely be covered. Sorry for taking so long to fix this, and thanks for the patch!