Do not add empty header/footer to notification emails
Right now, even if I set the email header or footer to be empty, Redmine will still put them into the email. For HTML emails, that means you still get a line like this in the HTML code:
<span class="header"><div style="white-space: pre-wrap;"></div></span>
For plain text emails, this means you still get "-- " followed by an empty line (actually, two, but that's another story) at the end of the email. This latter point also means that if you want to disable the global footer, and tweak select mail templates to include a custom footer, this clashes.
The attached patch is quite simple: It suppress output of any header related stuff (including the span element in the HTML) part if the header is set to an empty string. Similar for the footer.
#3 Updated by Anonymous almost 5 years ago
Thank you very much for this super quick reaction. I see that you also went to quite some trouble indeed, and even added some new tests for this. Thank you again for that, too!
Note: if you just had told me that I should add some tests, I would have also done that, though it would have probably taken me much longer and I am not sure if the result would have been good enough. Anyway, all I want to say is: Of course I fully understand if acceptance of a patch of mine is delayed because its quality does not meet your standards (e.g. if tests should be added) -- as long as somebody briefly tells me that, I am fully willing to work on improving my patches. But of course I won't complain if somebody else does the polishing for me, like you did.
So: Thanks yet again!