oblac/jodd — pull request #186 by oddcb (2014-11-13 15:43:21+00:00)
Title: Allows user to set the mail subject encoding if it differs from the platform.

Hello.

We've experienced an issue when deploy target doesn't have the default encoding set to UTF-8, but ANSI and our mail subject lines contain non-ANSI characters.

This PRs adds a second method of setting the mail subject in ```jodd.mail.Email``` which takes a string specifying the encoding. If subject encoding is specified the subject is added to ```javax.mail.internet.MimeMessage``` with the specified encoding. If encoding is not specified it follows the normal behaviour (from MimeMessage setSubject):

> Set the "Subject" header field. If the subject contains non US-ASCII characters, it will be encoded using the platform's default charset. If the subject contains only US-ASCII characters, no encoding is done and it is used as-is. If the subject is null, the existing "Subject" field is removed.

Tested to work as intended in our environment.