Page 2 of 5

Re: Email output could be much prettier

Posted: 09 Oct 2020, 18:09
by mushu
I used Chrome. Make sure your Vivaldi browser (for Android?) is version 3.3 because it updated the Chrome engine.

Re: Email output could be much prettier

Posted: 09 Oct 2020, 18:11
by mushu
Also, make sure your HTML is properly completed. I had to close the table element inside the loop per your sample code. And unclosed tr or td or table element will screw everything up.

Re: Email output could be much prettier

Posted: 09 Oct 2020, 18:12
by cas
Ok, i use vivaldi under windows 10 but also have Chrome and Edge available :mrgreen:

Re: Email output could be much prettier

Posted: 10 Oct 2020, 08:37
by cas
The question should be if users need all the info in an email. Playing around, I actually think that it does not make sense to copy the whole standard text-based email into a slightly more fancy lay-out. Yes it can be done but for me has no real value because it again can become a large email.
If a customer has real interest in the issue, I believe they will use the link to see the whole story.
So my suggestion is to stick to key elements like:
bug-id, reporter,summary, description,Due-date, handler & current status.
Followed by the latest changes made to the issue.
And of course a link to the issue.
Any more (other) views out there?

Re: Email output could be much prettier

Posted: 10 Oct 2020, 16:15
by mushu
Well, how about including just the latest info that changed and triggered the email at least, such as just the newest note or that someone was added as a monitor? I agree that there is no use for huge emails that contain the entire history, but the customer needs to at least see the thing that caused an email in the first place I'd imagine.

BTW how did that HTML/CSS update work when you tried a different browser?

Re: Email output could be much prettier

Posted: 11 Oct 2020, 08:28
by cas
The HTML/CSS issue is still around.
For new/changed notes a separate email is triggered, template available already.
For the issue, I will add just the history entries that caused the email to be triggered in addition to key data of the issue itself.
Coming week not much time so may take some time :mrgreen:

Re: Email output could be much prettier

Posted: 16 Oct 2020, 08:46
by cas
Attached something to test, feedback and/or improvements are appreciated :)

Re: Email output could be much prettier

Posted: 26 Oct 2020, 16:18
by mushu
Where is the equals signs separators stored in the source? I want to put a <br> in front and after each row of equals signs since the crlf is not displaying in the message when it is viewed as HTML in your email program. BTW this is Windows not Linux. Here is an example when i make the reader window wide:
mbtemail.PNG
mbtemail.PNG (35.31 KiB) Viewed 361794 times
I tried adding <br> after the items in the templates and it didn't do anything, then i tried to replace all "\r\n" with "\r\n<br>" but even that didn't do anything. So I'm not sure where to look now. I want every new line to start with a <br> which will force the reader to show a newline no matter how wide the reader window is. unless I don't know what I'm talking about, which is certainly possible...

Re: Email output could be much prettier

Posted: 26 Oct 2020, 16:50
by cas
This output seems to indicate that you did not make all changes I put in place since this is not HTML enabled output.
Did you use the provided email_api.php and did you make the correct changes in core/config_inc.php?

Re: Email output could be much prettier

Posted: 26 Oct 2020, 16:56
by mushu
Yes. I suppose it could be some weird setting in my email client (Outlook 2016) but even if it is not html enabled it should still show proper crlf end-of-lines. Shouldn't it?

Re: Email output could be much prettier

Posted: 26 Oct 2020, 17:01
by cas
What I see is that you are not using the templates I provided so something is not working on the Mantis side.

Re: Email output could be much prettier

Posted: 26 Oct 2020, 17:05
by mushu
Okay i will clear everything out and start it over again. Will let you know!

Re: Email output could be much prettier

Posted: 26 Oct 2020, 17:10
by cas
That seems best option, attached a slightly improved version :mrgreen:

Re: Email output could be much prettier

Posted: 26 Oct 2020, 17:12
by mushu
Okay. I had changed the config file path from your forward-slashes to my Windows back-slashes, but apparently they have to remain forward slashes in order for Mantis to read the location properly. So that now generates the following error:

SYSTEM NOTICE

'Undefined variable: t_private' in 'C:\MantisBT2243\core\template_api.php' line 144

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Re: Email output could be much prettier

Posted: 26 Oct 2020, 17:15
by cas
You see this due to your error configuration.
However you can simply remove that line :D