Email output could be much prettier

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

I used Chrome. Make sure your Vivaldi browser (for Android?) is version 3.3 because it updated the Chrome engine.
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post 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.
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

Ok, i use vivaldi under windows 10 but also have Chrome and Edge available :mrgreen:
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post 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?
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post 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?
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post 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:
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

Attached something to test, feedback and/or improvements are appreciated :)
Attachments
mailtemplate.zip
(23.15 KiB) Downloaded 37 times
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post 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 1119 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...
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post 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?
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post 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?
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

What I see is that you are not using the templates I provided so something is not working on the Mantis side.
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

Okay i will clear everything out and start it over again. Will let you know!
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

That seems best option, attached a slightly improved version :mrgreen:
Attachments
mailtemplate_2.zip
(23.23 KiB) Downloaded 20 times
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post 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.
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

You see this due to your error configuration.
However you can simply remove that line :D
Post Reply