[interchange] Teach send_mail() about MV_EMAIL_CHARSET
David Christensen <[email protected]> Mon, 13 Aug 2018 21:39:44 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit ed509da0b64bf62988c48d88cc62bad1a4c7ec41 Author: David Christensen <[email protected]> Date: Mon Aug 13 16:38:59 2018 -0500 Teach send_mail() about MV_EMAIL_CHARSET lib/Vend/Util.pm | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) --- diff --git a/lib/Vend/Util.pm b/lib/Vend/Util.pm index 5e2c82c..0a17335 100644 --- a/lib/Vend/Util.pm +++ b/lib/Vend/Util.pm @@ -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;