MDL-12103 new config option for mail newline chars; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2007-12-17 23:44:25 +00:00
parent 5730323b4b
commit 6265d4630b
3 changed files with 12 additions and 0 deletions

View file

@ -3833,6 +3833,14 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
$mail->CharSet = 'UTF-8';
// some MTAs may do double conversion of LF if CRLF used, CRLF is required line ending in RFC 822bis
// hmm, this is a bit hacky because LE should be private
if (isset($CFG->mailnewline) and $CFG->mailnewline == 'CRLF') {
$mail->LE = "\r\n";
} else {
$mail->LE = "\n";
}
if ($CFG->smtphosts == 'qmail') {
$mail->IsQmail(); // use Qmail system