Commit 0c978115 authored by sikeda's avatar sikeda
Browse files

[dev] Now Sympa::List::send_probe_to_user() uses...

[dev] Now Sympa::List::send_probe_to_user() uses Sympa::Spindle::ProcessTemplate to send probe messages to users.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12601 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent ecb9c36e
...@@ -37,7 +37,6 @@ use Storable qw(); ...@@ -37,7 +37,6 @@ use Storable qw();
use URI::Escape qw(); use URI::Escape qw();
use Sympa; use Sympa;
use Sympa::Bulk;
use Conf; use Conf;
use Sympa::ConfDef; use Sympa::ConfDef;
use Sympa::Constants; use Sympa::Constants;
...@@ -51,11 +50,11 @@ use Sympa::Language; ...@@ -51,11 +50,11 @@ use Sympa::Language;
use Sympa::ListDef; use Sympa::ListDef;
use Sympa::LockedFile; use Sympa::LockedFile;
use Sympa::Log; use Sympa::Log;
use Sympa::Message::Template;
use Sympa::Regexps; use Sympa::Regexps;
use Sympa::Robot; use Sympa::Robot;
use Sympa::Scenario; use Sympa::Scenario;
use SDM; use SDM;
use Sympa::Spindle::ProcessTemplate;
use Sympa::Task; use Sympa::Task;
use Sympa::Template; use Sympa::Template;
use Sympa::Ticket; use Sympa::Ticket;
...@@ -1965,30 +1964,29 @@ sub send_probe_to_user { ...@@ -1965,30 +1964,29 @@ sub send_probe_to_user {
my $type = shift; my $type = shift;
my $who = shift; my $who = shift;
my $message = Sympa::Message::Template->new( # Shelve VERP for welcome or remind message if necessary
my $tracking;
if ( $self->{'admin'}{'welcome_return_path'} eq 'unique'
and $type eq 'welcome') {
$tracking = 'w';
} elsif ($self->{'admin'}{'remind_return_path'} eq 'unique'
and $type eq 'remind') {
$tracking = 'r';
} else {
#FIXME? Return-Path for '*_return_path' parameter with 'owner'
# value is LIST-owner address. It might be LIST-request address.
}
my $spindle = Sympa::Spindle::ProcessTemplate->new(
context => $self, context => $self,
template => $type, template => $type,
rcpt => $who, rcpt => $who,
data => {} data => {},
); tracking => $tracking,
if ($message) {
# Shelve VERP for welcome or remind message if necessary
if ( $self->{'admin'}{'welcome_return_path'} eq 'unique'
and $type eq 'welcome') {
$message->{shelved}{tracking} = 'w';
} elsif ($self->{'admin'}{'remind_return_path'} eq 'unique'
and $type eq 'remind') {
$message->{shelved}{tracking} = 'r';
} else {
#FIXME: Currently, Return-Path for '*_return_path' parameter with
# 'owner' value is LIST-owner address. LIST-request address would
# be better, isn't it?
}
#FIXME: Why overwrite priority? #FIXME: Why overwrite priority?
$message->{priority} = priority => Conf::get_robot_conf($self->{'domain'}, 'sympa_priority'),
Conf::get_robot_conf($self->{'domain'}, 'sympa_priority'); );
} unless ($spindle and $spindle->spin and $spindle->{finish} eq 'success') {
unless ($message and defined Sympa::Bulk->new->store($message, $who)) {
$log->syslog('err', 'Could not send template %s to %s', $type, $who); $log->syslog('err', 'Could not send template %s to %s', $type, $who);
return undef; return undef;
} }
......
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