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: 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent ecb9c36e
......@@ -37,7 +37,6 @@ use Storable qw();
use URI::Escape qw();
use Sympa;
use Sympa::Bulk;
use Conf;
use Sympa::ConfDef;
use Sympa::Constants;
......@@ -51,11 +50,11 @@ use Sympa::Language;
use Sympa::ListDef;
use Sympa::LockedFile;
use Sympa::Log;
use Sympa::Message::Template;
use Sympa::Regexps;
use Sympa::Robot;
use Sympa::Scenario;
use SDM;
use Sympa::Spindle::ProcessTemplate;
use Sympa::Task;
use Sympa::Template;
use Sympa::Ticket;
......@@ -1965,30 +1964,29 @@ sub send_probe_to_user {
my $type = shift;
my $who = shift;
my $message = Sympa::Message::Template->new(
context => $self,
template => $type,
rcpt => $who,
data => {}
if ($message) {
# Shelve VERP for welcome or remind message if necessary
my $tracking;
if ( $self->{'admin'}{'welcome_return_path'} eq 'unique'
and $type eq 'welcome') {
$message->{shelved}{tracking} = 'w';
$tracking = 'w';
} elsif ($self->{'admin'}{'remind_return_path'} eq 'unique'
and $type eq 'remind') {
$message->{shelved}{tracking} = 'r';
$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? 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,
template => $type,
rcpt => $who,
data => {},
tracking => $tracking,
#FIXME: Why overwrite priority?
$message->{priority} =
Conf::get_robot_conf($self->{'domain'}, 'sympa_priority');
unless ($message and defined Sympa::Bulk->new->store($message, $who)) {
priority => Conf::get_robot_conf($self->{'domain'}, 'sympa_priority'),
unless ($spindle and $spindle->spin and $spindle->{finish} eq 'success') {
$log->syslog('err', 'Could not send template %s to %s', $type, $who);
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