View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023892 | mantisbt | public | 2018-01-26 06:29 | 2018-01-26 11:58 | |
Reporter | kallelix | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0023892: email queuing notifications don't account settings of 'from_email' and 'return_path_email' of project | ||||
Description | The email notifications don't account 'from_email' and 'return_path_email' of the project settings if email queuing is enabled ($g_email_send_using_cronjob = ON). I upgraded from 1.2 to 2.1 and I found a hack of mine to solve this issue in the past for 1.2. I added code to get the project settings in function store_email::email_api.php and inject it in the metadata array. The old diff is below. I wonder is there a better way to solve this in 2.1 or will there be a generell fix? For now I stay with $g_email_send_using_cronjob = OFF,which is far from ideal. | ||||
Additional Information |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
diff is not readable in the message email_api.php.diff (2,073 bytes)
root@zapp:/var/www/mantis/core# diff email_api.php email_api.php.old 784c784 < function email_store( $p_recipient, $p_subject, $p_message, $p_headers = null, $p_project_id = null ) { --- > function email_store( $p_recipient, $p_subject, $p_message, $p_headers = null ) { 803,808c803,804 < // ### < $t_email_data->metadata['priority'] = config_get( 'mail_priority', null, null, $p_project_id ); < $t_email_data->metadata['from_email'] = config_get( 'from_email', null, null, $p_project_id); < $t_email_data->metadata['return_path_email'] = config_get( 'return_path_email', null, null, $p_project_id); < $t_email_data->metadata['from_name'] = config_get( 'from_name', null, null, $p_project_id); < // ###end --- > $t_email_data->metadata['priority'] = config_get( 'mail_priority' ); > 942,967c938,941 < // ### < if (is_blank($t_email_data->metadata['from_email'])) < { < $mail->From = config_get( 'from_email' ); < } < else < { < $mail->From = $t_email_data->metadata['from_email']; < } < if (is_blank($t_email_data->metadata['return_path_email'])) < { < $mail->Sender = config_get( 'return_path_email' ); < } < else < { < $mail->Sender = $t_email_data->metadata['return_path_email']; < } < if (is_blank($t_email_data->metadata['from_name'])) < { < $mail->FromName = config_get( 'from_name' ); < } < else < { < $mail->FromName = $t_email_data->metadata['from_name']; < } < // ### END --- > $mail->From = config_get( 'from_email' ); > $mail->Sender = config_get( 'return_path_email' ); > $mail->FromName = config_get( 'from_name' ); > 1218,1219c1192 < // ### < $t_ok = email_store( $t_user_email, $t_subject, $t_message, $t_mail_headers, $p_project_id ); --- > $t_ok = email_store( $t_user_email, $t_subject, $t_message, $t_mail_headers ); |
|
fixed |
|