diff --git a/admin/tokens.php b/admin/tokens.php index fa409711a78..87efdd19f6c 100644 --- a/admin/tokens.php +++ b/admin/tokens.php @@ -652,6 +652,8 @@ $emcount = mysql_num_rows($emresult); $headers = "From: {$_POST['from']}\r\n"; $headers .= "X-Mailer: $sitename Emailer (PHPSurveyor.sourceforge.net)\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-Type: text/plain; charset=" .encode_lang($defaultlang) . "\r\n"; $message = strip_tags($_POST['message']); $message = str_replace(""", '"', $message); if (get_magic_quotes_gpc() != "0") @@ -696,6 +698,7 @@ // line endings. This converts them to just line endings. This is not correct, and may // cause problems with certain email server //$sendmessage = str_replace("\r", "", $sendmessage); + $msgsubject= encode_lang($defaultlang,$msgsubject); if (mail($to, $msgsubject, $sendmessage, $headers)) { $udequery = "UPDATE {$dbprefix}tokens_{$_POST['sid']} SET sent='Y' WHERE tid={$emrow['tid']}"; @@ -828,6 +831,8 @@ $emcount = mysql_num_rows($emresult); $headers = "From: {$_POST['from']}\r\n"; $headers .= "X-Mailer: $sitename Email Reminder"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-Type: text/plain; charset=" .encode_lang($defaultlang) . "\r\n"; echo "\n" ."\t\n" ."\t\t
\n"; @@ -871,6 +876,7 @@ // line endings. This converts them to just line endings. This is not correct, and may // cause problems with certain email server //$sendmessage = str_replace("\r", "", $sendmessage); + $msgsubject= encode_lang($defaultlang,$msgsubject); if (mail($to, $msgsubject, $sendmessage, $headers)) { echo "\t\t\t({$emrow['tid']})["._TC_REMINDSENTTO." {$emrow['firstname']} {$emrow['lastname']}]
\n"; diff --git a/index.php b/index.php index e57f9366bfe..7a0da57670a 100644 --- a/index.php +++ b/index.php @@ -833,7 +833,10 @@ function submittokens() while ($cnfrow = mysql_fetch_array($cnfresult)) { $headers = "From: {$thissurvey['adminname']} <{$thissurvey['adminemail']}>\r\n"; - $headers .= "X-Mailer: $sitename Email Inviter"; + $headers .= "X-Mailer: $sitename Email Inviter\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-Type: text/plain; charset=" .encode_lang($thissurvey['language']) . "\r\n"; + $to = $cnfrow['email']; $subject = $thissurvey['email_confirm_subj']; // $subject = _CONFIRMATION.": {$thissurvey['name']} "._SURVEYCPL; @@ -910,6 +913,9 @@ function sendsubmitnotification($sendnotification) $message.= "PHP Surveyor"; $message = crlf_lineendings($message); $headers = "From: {$thissurvey['adminemail']}\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-Type: text/plain; charset=" .encode_lang($thissurvey['language']) . "\r\n"; + if ($recips=explode(";", $thissurvey['adminemail'])) { foreach ($recips as $rc)