Permalink
Browse files

Merge branch 'MDL-29814_blank_emails2_21' of git://github.com/andyjda…

…vis/moodle into MOODLE_21_STABLE
  • Loading branch information...
2 parents 2823fe8 + 9694f1c commit 7d584b168bb092a15552fec238060a095572e421 @nebgor nebgor committed Nov 21, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 message/lib.php
View
@@ -2011,8 +2011,10 @@ function message_post_message($userfrom, $userto, $message, $format) {
$eventdata->subject = get_string_manager()->get_string('unreadnewmessage', 'message', fullname($userfrom), $userto->lang);
if ($format == FORMAT_HTML) {
- $eventdata->fullmessage = '';
$eventdata->fullmessagehtml = $message;
+ //some message processors may revert to sending plain text even if html is supplied
+ //so we keep both plain and html versions if we're intending to send html
+ $eventdata->fullmessage = html_to_text($eventdata->fullmessagehtml);
} else {
$eventdata->fullmessage = $message;
$eventdata->fullmessagehtml = '';

0 comments on commit 7d584b1

Please sign in to comment.