Page 1 of 1

Custom record insertion in 'mantis_email_table`

Posted: 03 Jul 2024, 04:45
by shanthini.g
We want to send notifications for our custom messages using Mantis mail table. For these we want to generate and store 'Message-ID'.

Please suggest how can we generate 'Message-ID`

Re: Custom record insertion in 'mantis_email_table`

Posted: 08 Jul 2024, 08:08
by cas
That is automatically generated by the DB.
Just insert a record providing all relevant info but do not provide any value for email_id :mrgreen:

Re: Custom record insertion in 'mantis_email_table`

Posted: 10 Jul 2024, 04:34
by shanthini.g
We are facing an issue when we send messages with special characters when I insert records directly.

Example
Our message: [Mantis Training 155911] Request – Leave/Work/Permission/On Duty: The "Add" button symbol is missing in the grid view.
Message we received in inbox: =??Q?[Mantis_Training_155911]_Request_=E2=80=93_Leave/Work/Permission/On_Duty:_The_"Add"_button_symbol_is_missing_in_the_grid_view.?=

However, using metadata with ‘MESSAGE-ID’ seems to resolve this problem. Can anyone guide me on how to generate the appropriate metadata with ‘MESSAGE-ID’ for this purpose?

Re: Custom record insertion in 'mantis_email_table`

Posted: 10 Jul 2024, 12:54
by cas
Did you try to execute the SQL statement directly using a tool like Heidi/phpmyadmin?

Re: Custom record insertion in 'mantis_email_table`

Posted: 11 Jul 2024, 05:42
by shanthini.g
Yes, We are inserting the record using trigger in phpMyAdmin, as below

INSERT INTO `mantis_email_table` (`email_id`, `email`, `subject`, `metadata`, `body`, `submitted`) VALUES
(8, 'XXXX', '[Mantis Training 0156204]: Request – Leave/Work/Permission/On Duty: The "Add" button symbol is missing in the grid view.', '', 'The Dev Env Status of the following issue has been INTEGRATION COMPLETED', 1720675761);

Re: Custom record insertion in 'mantis_email_table`

Posted: 11 Jul 2024, 14:33
by cas
Activate logging on the mail function and chheck the logs.
Also check core/email_api.php, there you can see how metadata is created.

Re: Custom record insertion in 'mantis_email_table`

Posted: 18 Jul 2024, 08:06
by shanthini.g
Thanks for the reply.

We have resolved this by adding charset to metadata during insertion.