View Issue Details

IDProjectCategoryView StatusLast Update
0021826mantisbtemailpublic2016-11-01 10:28
ReporterGrowiel Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status confirmedResolutionopen 
Product Version1.3.2 
Summary0021826: Incorrect 'from_email' value when using the mail queue.
Description

I have setup different 'from_email' for each of my projects using the "configuration report" page.

When I add a new issue or a note to an existing issue using the website, the mails are correctly sent using the project-defined 'from_email'.

However, when the note is added via pluging (in my case: EmailReporter), the mail is sent with the default 'from_email'.

I've looked into what EmailReporter is doing when adding notes and it's simply calling bugnote_add(), it does not send emails on its own, which makes me believe that this a MantisBT bug and not an EmailReporter one.

I realize this is probably pretty low on the list, but for now it prevents us from using the EmailReporter (they can't reply to the email, since the email is not sent from the correct address), which is a huge minus for our non tech-savy users.

Additional Information

If it helps, I've done some debug to pinpoint the bug and config_get('from_email') is called 2 times:

1) email_store() in email_api.php to get the hostname metadata.
At that point the value returned by config_get() is CORRECT and comes from the cache table ($t_found = true).

2) email_send() in email_api.php (in my case, called by email_shutdown_function()) to set the $t_mail->From.
At that point the value returned by config_get() is INCORRECT and comes from config_get_global() ($t_found = false).

TagsNo tags attached.

Activities

atrol

atrol

2016-11-01 10:28

developer   ~0054360

Can also be reproduced by using bulk operation "Add Note" of "View Issues" page.

I assume we will see similar behavior for standard interactive add note operation when using $g_email_send_using_cronjob = ON; and having emails from different projects in the email queue.