Email output could be much prettier

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

Mushu,
which fields give you the System Notices?
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

Can we start thinking about the code changes necessary to support the new Mantis version 2.25.0 soon? I know that the phpmailer code was rewritten a bit, not sure how that will affect our beautiful templates.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

did you test this in 2.25.0 already? I would not expect any issues :mrgreen:
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

No, I don't have the new version installed. I just saw there were rewrites of the email code and figured it might affect the templates. I wish they would build it into the base code...I also don't have all of the changes necessary to implement the templates in one place, so I will have to read back through this thread and make a document soon.
keessonnema
Posts: 5
Joined: 12 Mar 2019, 14:08

Re: Email output could be much prettier

Post by keessonnema »

I'm glad I stumbled across this thread, we need exactly this.
I have tried it myself for many hours, but couldn't find any logic to bite into.

@Cas are you still planning on improving this? Also was the version 3 you mentioned on the previous page finished to test?
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

Hi/hoi Kees,
let's take this to: http://www.nuy.info/mantis2
We can see what we can adjust where possible (even in Dutch :D )
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

cas wrote: 06 Nov 2021, 10:25 Hi/hoi Kees,
let's take this to: http://www.nuy.info/mantis2
We can see what we can adjust where possible (even in Dutch :D )
That website domain is not accessible. Flagged:

The website you are trying to access either presents a security risk or is not allowed under your organization's acceptable use policy.
If you think you are receiving this message in error, please contact your IT help desk.
[MAIL]
[PHONE]
Create Ticket
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

cas wrote: 09 Mar 2021, 08:17 did you test this in 2.25.0 already? I would not expect any issues :mrgreen:
Is it possible that this change doesn't work in the new 2.25.2 version? I did the database update manually so may have missed something if the update required running PHP code for any reason...see this ticket: https://www.mantisbt.org/forums/viewtopic.php?t=27671
Last edited by mushu on 06 Jan 2022, 18:19, edited 1 time in total.
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

mushu wrote: 15 Jan 2021, 15:10
cas wrote: 26 Oct 2020, 19:26 I will change my setup to display all messages and will fix them somewhere this week. Then I will post version 3 :D
Specifically I'm waiting for this release so I can turn on error messages again. ;-)
Hey did you ever get version 3 finished? I don't see a link posted in this thread...
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

I will verify my solution for version 2.25.2 and fix loose ends, if any. :mrgreen:
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

cas wrote: 06 Jan 2022, 18:13 I will verify my solution for version 2.25.2 and fix loose ends, if any. :mrgreen:
Yay! The error I got was when I was trying to close a ticket and when I selected [Resolved] and submitted it gave me that error. I've turned off all error stops for now so i could go on but I think it didn't send an email for that ticket closure because of the error. mantis seems to be working fine though since the ticket ended up closed properly. Just no email.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

First of all, my website is up and running normally. I think your company has blocked the INFO domain.
As for the solution, I have installed on a clean 2.25.2 installation and it worked like a charm.
In case you used the email_api from the distribution then that is most likely the cause of your problem.
I have the correct version for 2.25.2 attached for you
I have no other loose ends other than to explore to what extend I can turn this into a real plugin.
Try it out and let me know the results.
Attachments
email_api.zip
(18.38 KiB) Downloaded 6412 times
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

Thanks for this. I grabbed your file and compared to mine and found that yours is missing the html template test as the only difference. I renamed mine with "-OLD" at the end and did a compare:

Code: Select all

***** email_api.php
        $t_mail->isHTML( false );              # set email format to plain text
        $t_mail->WordWrap = 80;              # set word wrap to 80 characters
***** EMAIL_API-OLD.PHP
        $t_mail->isHTML( false );              # set email format to plain text
## CN
        if ( ON == config_get( 'use_mailtemplate' ) )  {
                $t_mail->isHTML( true );
        }
## CN
        $t_mail->WordWrap = 80;              # set word wrap to 80 characters
*****
So that isn't the problem. Plus I was able to get to your website now for some reason but it want's a registration so haven't done that. Not sure what the problem was the other day.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

You do need that html template test, that was a mistake from me.
So best way forward then is to disable other plugins and see what is giving the issue.
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

Hey cas, please see this post, especially the last couple of entries...think yu might be able to github your updates? https://www.mantisbt.org/forums/viewtopic.php?t=27731

EDIT also https://www.mantisbt.org/forums/viewtopic.php?t=27716
Post Reply