Subject: | Double encoding to utf-8 in subject |
Date: | Mon, 1 Jun 2015 17:17:02 +0300 |
To: | bug-Catalyst-View-Email [...] rt.cpan.org |
From: | StreSS Unk <stress.t [...] gmail.com> |
Hello.
If use code
$c->stash->{email} = {
to => $c->config->{'Email'}->{'to'},
content_type => 'text/html',
cc => '',
from => 'xxx@xxx',
subject => 'тест',
body => $c->response->body,
};
I Have email with subject 'ÑеÑÑ'
If use code:
$c->stash->{email} = {
header => [
To =>
$c->config->{'Email'}->{'to'},
From => 'xxx@xxx',
Subject => encode("MIME-Header",
decode_utf8('тест')),
],
# Or, send parts
parts => [
Email::MIME->create(
attributes => {
content_type => 'text/html',
disposition => 'attachment',
charset => 'utf-8',
},
body =>
$c->response->body,
)
],
};
Subject is: 'тест'
Thanks