Skip to content

Commit

Permalink
MDL-13412 Allow callers of email_to_user() to set wordwrap; merged fr…
Browse files Browse the repository at this point in the history
…om MOODLE_19_STABLE
  • Loading branch information
skodak committed Mar 15, 2008
1 parent 5ac776a commit b5f3a99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/moodlelib.php
Expand Up @@ -3991,10 +3991,11 @@ function &get_mailer($action='get') {
* @param string $attachname the name of the file (extension indicates MIME)
* @param bool $usetrueaddress determines whether $from email address should
* be sent out. Will be overruled by user profile setting for maildisplay
* @param int $wordwrapwidth custom word wrap width
* @return bool|string Returns "true" if mail was sent OK, "emailstop" if email
* was blocked by user and "false" if there was another sort of error.
*/
function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $attachment='', $attachname='', $usetrueaddress=true, $replyto='', $replytoname='') {
function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $attachment='', $attachname='', $usetrueaddress=true, $replyto='', $replytoname='', $wordwrapwidth=79) {

global $CFG, $FULLME;

Expand Down Expand Up @@ -4062,7 +4063,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a

$mail->AddAddress($user->email, fullname($user) );

$mail->WordWrap = 79; // set word wrap
$mail->WordWrap = $wordwrapwidth; // set word wrap

if (!empty($from->customheaders)) { // Add custom headers
if (is_array($from->customheaders)) {
Expand Down

0 comments on commit b5f3a99

Please sign in to comment.