genkgo/mail

Currently charset = us-ascii, how to set another one?

k00ni opened this issue · 2 comments

k00ni commented

Hi, when checking the generated mail message manually, i discovered you using us-ascii as character set.

Example:

Subject: subject
From: sender name <sender@mail.de>
Reply-To: reply@to.de
To: receiver@1.de
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=GenkgoMailV2Part792e4450d62c

This is a multipart message in MIME format.

--GenkgoMailV2Part792e4450d62c
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

plain text

--GenkgoMailV2Part792e4450d62c
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

html text
--GenkgoMailV2Part792e4450

I was wondering how to change that? Also, could i run into UTF-8 related problems with that?

The system detects automatically which charset is required. Since, you are not using any multi-byte characters in your message, the charset is us-ascii and the encoding is 7bit. The following test shows that the transfer encoding changes once you start using different characters.

k00ni commented

Ok, thanks.