Permalink
Browse files

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

…vis/moodle into MOODLE_20_STABLE
  • Loading branch information...
nebgor committed Nov 21, 2011
2 parents 6c5fe9f + 878ff40 commit e239fd37b8f7004ca9fe26d1ffbe64bb9bace7c3
Showing with 3 additions and 1 deletion.
  1. +3 −1 message/lib.php
View
@@ -1944,8 +1944,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 e239fd3

Please sign in to comment.