summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/sendmail.inc9
1 files changed, 4 insertions, 5 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 2d2cb33db..7c7727bba 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -301,12 +301,11 @@ $msg_body = $MAIL_MIME->get($message_param);
// unset to save memory.
unset($MAIL_MIME->_parts);
-$msg_subject = $headers['Subject'];
-
if ($MBSTRING && function_exists("mb_encode_mimeheader"))
{
- mb_internal_encoding($CHARSET);
+ mb_internal_encoding($message_charset);
$headers['Subject'] = mb_encode_mimeheader($headers['Subject'], $message_charset, 'Q');
+ mb_internal_encoding($CHARSET);
}
// Begin SMTP Delivery Block
@@ -358,9 +357,9 @@ if (!$savedraft) {
$header_str = $MAIL_MIME->txtHeaders($headers_php);
if (ini_get('safe_mode'))
- $sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str);
+ $sent = mail($headers_enc['To'], $headers['Subject'], $msg_body, $header_str);
else
- $sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str, "-f$from");
+ $sent = mail($headers_enc['To'], $headers['Subject'], $msg_body, $header_str, "-f$from");
}