Project

General

Profile

Bug #9185

Mailreport - Cant sending repports if multiple emails addresses in smtpnotifyemailaddress

Added by Joshua Sign 4 months ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Mail report
Target version:
-
Start date:
12/09/2018
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.4.x
Affected Architecture:
All

Description

In the field smtpnotifyemailaddress on the system_advanced_notifications.php we can put pultiple mail addresses with a coma separator.
The system handle them correctly.

But the mailreport packages does not, because in mail_reports.inc it only consider the field smtpnotifyemailaddress contains only one address.

Can I suggest a correction in the source code by pushing request on github ?

Here is the modification i suggest :

$addresses = explode(",", $config['notifications']['smtp']['notifyemailaddress']);
foreach ($addresses as $address){
$recipient=explode("@", $address);
$recipient=str_replace(array("_",".")," ",$recipient0);
$mail->AddAddress($address, ucwords(strtolower($recipient));
}

History

#1 Updated by Joshua Sign 4 months ago

i forget a ) in the code, the good one is :

$addresses = explode(",", $config['notifications']['smtp']['notifyemailaddress']);
foreach ($addresses as $address){
$recipient=explode("@", $address);
$recipient=str_replace(array("_",".")," ",$recipient0);
$mail->AddAddress($address, ucwords(strtolower($recipient)));
}

Also available in: Atom PDF