Commit 7e0be4dd authored by sikeda's avatar sikeda
Browse files

[bug] [Reported by J. Kirkland] Messages sent by Sympa robot uses list owner...

[bug] [Reported by J. Kirkland] Messages sent by Sympa robot uses list owner addresses and so on by default.  They should be "sympa" addresses.  This bug was injected by commit r10223.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12276 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 0b8bf6ae
From: [% from %]
To: [% to %]
Subject: [% FILTER qencode %][%subject%][%END%]
Content-Type: multipart/mixed; boundary="[% boundary1 %]"
......
......@@ -535,7 +535,6 @@ sub getfile {
msg_list => [@msg_list],
boundary1 => tools::get_message_id($list->{'domain'}),
boundary2 => tools::get_message_id($list->{'domain'}),
from => Conf::get_robot_conf($list->{'domain'}, 'sympa'),
auto_submitted => 'auto-replied'
};
unless (Sympa::send_file($list, 'get_archive', $sender, $param)) {
......@@ -683,7 +682,6 @@ sub last {
msg_list => [@msglist],
boundary1 => tools::get_message_id($list->{'domain'}),
boundary2 => tools::get_message_id($list->{'domain'}),
from => Conf::get_robot_conf($list->{'domain'}, 'sympa'),
auto_submitted => 'auto-replied'
};
unless (Sympa::send_file($list, 'get_archive', $sender, $param)) {
......
......@@ -423,12 +423,8 @@ sub new_from_template {
} else {
$data->{'fromlist'} = $list->get_list_address('owner');
}
$data->{'from'} ||= $data->{'fromlist'};
} else {
$data->{'robot_domain'} = Conf::get_robot_conf($robot_id, 'domain');
$data->{'from'} ||= Conf::get_robot_conf($robot_id, 'sympa');
}
$data->{'boundary'} = '----------=_' . tools::get_message_id($robot_id)
unless $data->{'boundary'};
......@@ -590,9 +586,16 @@ sub _new_from_template {
$headers .= "To: $to\n";
}
unless ($header_ok{'from'}) {
if ( !defined $data->{'from'}
or $data->{'from'} eq 'sympa'
unless (defined $data->{'from'}) {
$headers .= sprintf "From: %s\n",
tools::addrencode(
Conf::get_robot_conf($robot_id, 'sympa'),
Conf::get_robot_conf($robot_id, 'gecos'),
$data->{'charset'}
);
} elsif ($data->{'from'} eq 'sympa'
or $data->{'from'} eq $data->{'conf'}{'sympa'}) {
#XXX NOTREACHED: $data->{'from'} was obsoleted.
$headers .= 'From: '
. tools::addrencode(
$data->{'conf'}{'sympa'},
......@@ -600,6 +603,7 @@ sub _new_from_template {
$data->{'charset'}
) . "\n";
} else {
#XXX NOTREACHED: $data->{'from'} was obsoleted.
$headers .= "From: "
. MIME::EncWords::encode_mimewords(
Encode::decode('utf8', $data->{'from'}),
......@@ -3663,6 +3667,10 @@ See also L<Sympa::Language>.
"From:" field if not a full msg
Note:
This parameter is obsoleted.
The "From:" field will be filled in by "sympa" address if it is not found.
=item subject
"Subject:" field if not a full msg
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment