Open matthewhilton opened 9 months ago
This seems to not just be limited to cancellation emails, have seen it happen as well to confirmation emails.
May also be related to https://github.com/catalyst/moodle-mod_facetoface/issues/146 - I think the details field is an editor in the form, but under the hood is using html_to_text https://github.com/catalyst/moodle-mod_facetoface/blob/a0cc8a56aece5465cabe43ecaa4ce0a805f09603/lib.php#L804
Imagine you have the cancellation email text set as the following:
If you were to cancel this booking, the user would get two emails (which is a different issue, see https://github.com/catalyst/moodle-mod_facetoface/issues/60)
The email without the .ics attachment will show normally, i.e. what is above. However, the email with the .ics attachment would be joined into a single line, e.g.:
This looks to be because when sending cancellation emails, when sending the .ics email here:
https://github.com/catalyst/moodle-mod_facetoface/blob/10d6966c09620d76749bf3ca0f4a6245923808bb/lib.php#L2260-L2261
Both the
$messagehtml
and$messagetext
are set as plaintext (no html), i.e.:Which leads to email clients interpreting this message as html, but since there are no line breaks, etc... it joins it all into a single one line string.
This does not seem to happen with confirmation messages, because they use a html editor and probably format the text into both html and plaintext properly, instead of the cancellation messages which just use the normal plain textarea editor.