Skip to content

Commit

Permalink
Teach send_mail() about MV_EMAIL_CHARSET
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christensen committed Aug 13, 2018
1 parent f2fec38 commit ed509da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Vend/Util.pm
Expand Up @@ -2124,6 +2124,12 @@ sub cookies_hash {
sub send_mail {
my($to, $subject, $body, $reply, $use_mime, @extra_headers) = @_;

if (my $charset = $::Variable->{MV_EMAIL_CHARSET} || $Global::Variable->{MV_EMAIL_CHARSET}) {
if (!grep /content-type/i, @extra_headers) {
push @extra_headers, "Content-type: text/plain; charset=$charset";
}
}

if(ref $to) {
my $head = $to;

Expand Down

0 comments on commit ed509da

Please sign in to comment.