Subject: Developers of Sympa
List archive
[sympa-dev] Field the TO field with the email of the person who will receive the email.
- From: "Thibault Verollet" <address@concealed>
- To: <address@concealed>
- Subject: [sympa-dev] Field the TO field with the email of the person who will receive the email.
- Date: Wed, 26 Jul 2000 11:13:55 +0200
OOP’s sorry New field in the mailing list configuration: send_to
Two files where modified: List.pm and smtp.pl from sympa 2.7.2, but it should work with version 2.7.3 (if adding the lines and not deleting the files) Have a great day Tibo |
- *SMTP = &smtpto($from, $rcpt);
do_log('debug2', 'message => %s',$msg);
$msg->print(\*SMTP);
close(SMTP);
return 1;
+ my($listname, $host) = split(/[@\s]+/, $from);
($listname,$host) = split(/-owner/,$listname); #en esperant qu'il
n'ecrive jamais autre chose en plus
my $list = new List ($listname);
return undef unless $list;
my $admin = $list->{'admin'};
return undef unless $admin;
do_log('debug', 'listname =>%s list param =>
%s',$listname,$admin->{'send_to'});
if( $admin->{'send_to'} eq 'perso')
{
my $nbr_rcpt=@$rcpt;
#do_log('debug', 'nbr destinataire => %d',$nbr_rcpt);
my $tibo=0;
for ($tibo=0;$tibo<$nbr_rcpt;$tibo++)
{
do_log('debug', 'le destinataire %d =>
%s',$tibo,@$rcpt[$tibo]);
my @rcpt_indi=@$rcpt[$tibo];
my $rrcpt_indi=\@rcpt_indi;
#do_log('debug', 'la ref du destinataire %d =>
%s',$tibo,$rrcpt_indi);
if (!$tibo)
{
*SMTP = &smtpto($from, $rrcpt_indi);
}
else
{
*SMTP = &smtpto("", $rrcpt_indi);
}
$msg->head->delete("To");
$msg->head->add('To', "@$rcpt[$tibo]") ;
$msg->print(\*SMTP);
close(SMTP);
}
return 1;
}
else
{
*SMTP = &smtpto($from, $rcpt);
do_log('debug2', 'message => %s',$msg);
$msg->print(\*SMTP);
close(SMTP);
return 1;
}
List.pm
- if
(/^\s*(forced_reply-to|forced_reply_to|forced_replyto)\s+(sender|list|.*)\s*$/o)
{
$admin->{'forced_reply_to'} = $2;
next;
}
+ if
(/^\s*(forced_reply-to|forced_reply_to|forced_replyto)\s+(sender|list|.*)\s*$/o)
{
$admin->{'forced_reply_to'} = $2;
next;
}
if (/^\s*(send-to|send_to|sendto)\s+(sender|list|.*)\s*$/o) {
$admin->{'send_to'} = $2;
#do_log('debug2', 'List::send_to(%s)', $admin->{'send_to'});
next;
}
Attachment:
List.pm
Description: Binary data
Attachment:
smtp.pm
Description: Binary data
- [sympa-dev] Field the TO field with the email of the person who will receive the email., Thibault Verollet, 07/26/2000
Archive powered by MHonArc 2.6.19+.