View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021896 | mantisbt | public | 2016-11-10 08:47 | 2016-11-27 00:45 | |
Reporter | LeChuck | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.17 | ||||
Target Version | 1.3.4 | Fixed in Version | 1.3.4 | ||
Summary | 0021896: Fix Outlook preview for email notifications by removing empty line at top | ||||
Description | Usually the body of a mail send by Mantis starts with one sentence that explains what triggered the mail, e.g. "A NOTE has been added to this issue." In its default view, Outlook shows the subject of an email and the first line of that email (see screenshot "MantisEmptyLineInMail1.png"). But for some reason Mantis starts mails always with an empty line before the "trigger explanation", so Outlook shows this empty line instead of what triggered the mail (which would be really nice info). After some investigation I finally found that the empty line is added in function email_send (in email_api.php): Is there any reason why a newline is added to the message as the first character? I checked the GitHub source history because I was curious, but even the earliest version of that file (25.08.2002) already contains this code. If I change the line to this | ||||
Additional Information | Mantis 1.2.17 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
I looked at the history, and indeed can't think of any reason for adding the newline at the beginning of the message body. The explanation I can think of, is that a newline is required as separator between the message header and the body, but PHPMailer handles that for us automatically... maybe earlier versions of the library didn't ? Anyway, I think this extra newline can be safely removed. |
|
MantisBT: master-1.3.x 5407ec7d 2016-11-11 01:59 Details Diff |
Remove leading newline from email body This extra blank line prevents email clients such as Outlook from displaying a preview of MantisBT's notification messages in a list view. The newline does not serve any known purpose (PHPMailer already adds one to separate the message header from its body), and testing does not show any regression when notifications are sent sent without it. This commit removes the extra '\n'. Fixes 0021896 |
Affected Issues 0021896 |
|
mod - core/email_api.php | Diff File |