4teamwork / ftw.participation

Invite other users (registered or unregistered) to a context in plone.
3 stars 0 forks source link

Incorrectly encoded header in invitation mail #16

Open buchi opened 10 years ago

buchi commented 10 years ago

The "From" header is incorrectly encoded if it contains non-ASCII characters.

In https://github.com/4teamwork/ftw.participation/blob/master/ftw/participation/browser/invite.py#L275 the email_from_name property should first be decoded to unicode before creating the header with iso-8859-1 encoding.

Why are we using different encodings for the notification mails created by this package? E.g. in the invitation mail the headers are encoded in iso-8859-1 and the body is encoded in utf-8, while the accept mail (headers and body) is encoded in windows-1252. Mail creation should be unified and done in one single place.

tschanzt commented 10 years ago

@buchi I think we should use ftw.notification.* here since these packages exist to send notifictations and is adjustable enough.