Custom record insertion in 'mantis_email_table`

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
shanthini.g
Posts: 55
Joined: 31 May 2017, 12:45

Custom record insertion in 'mantis_email_table`

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

Re: Custom record insertion in 'mantis_email_table`

Post 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:
shanthini.g
Posts: 55
Joined: 31 May 2017, 12:45

Re: Custom record insertion in 'mantis_email_table`

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

Re: Custom record insertion in 'mantis_email_table`

Post by cas »

Did you try to execute the SQL statement directly using a tool like Heidi/phpmyadmin?
shanthini.g
Posts: 55
Joined: 31 May 2017, 12:45

Re: Custom record insertion in 'mantis_email_table`

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

Re: Custom record insertion in 'mantis_email_table`

Post 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.
shanthini.g
Posts: 55
Joined: 31 May 2017, 12:45

Re: Custom record insertion in 'mantis_email_table`

Post by shanthini.g »

Thanks for the reply.

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