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`
Custom record insertion in 'mantis_email_table`
Moderators: Developer, Contributor
-
shanthini.g
- Posts: 60
- Joined: 31 May 2017, 12:45
Re: Custom record insertion in 'mantis_email_table`
That is automatically generated by the DB.
Just insert a record providing all relevant info but do not provide any value for email_id
Just insert a record providing all relevant info but do not provide any value for email_id
-
shanthini.g
- Posts: 60
- Joined: 31 May 2017, 12:45
Re: Custom record insertion in 'mantis_email_table`
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?
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`
Did you try to execute the SQL statement directly using a tool like Heidi/phpmyadmin?
-
shanthini.g
- Posts: 60
- Joined: 31 May 2017, 12:45
Re: Custom record insertion in 'mantis_email_table`
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);
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`
Activate logging on the mail function and chheck the logs.
Also check core/email_api.php, there you can see how metadata is created.
Also check core/email_api.php, there you can see how metadata is created.
-
shanthini.g
- Posts: 60
- Joined: 31 May 2017, 12:45
Re: Custom record insertion in 'mantis_email_table`
Thanks for the reply.
We have resolved this by adding charset to metadata during insertion.
We have resolved this by adding charset to metadata during insertion.