|
Lines 35-40
my $verbose = 0;
Link Here
|
| 35 |
my $where; |
35 |
my $where; |
| 36 |
my @type; |
36 |
my @type; |
| 37 |
my @letter_code; |
37 |
my @letter_code; |
|
|
38 |
my @exclude_letter_code; |
| 38 |
my $exit_on_plugin_failure = 0; |
39 |
my $exit_on_plugin_failure = 0; |
| 39 |
|
40 |
|
| 40 |
my $command_line_options = join( " ", @ARGV ); |
41 |
my $command_line_options = join( " ", @ARGV ); |
|
Lines 49-54
GetOptions(
Link Here
|
| 49 |
'v|verbose' => \$verbose, |
50 |
'v|verbose' => \$verbose, |
| 50 |
't|type:s' => \@type, |
51 |
't|type:s' => \@type, |
| 51 |
'c|code:s' => \@letter_code, |
52 |
'c|code:s' => \@letter_code, |
|
|
53 |
'x|exclude-code:s' => \@exclude_letter_code, |
| 52 |
'w|where:s' => \$where, |
54 |
'w|where:s' => \$where, |
| 53 |
'e|exit-on-plugin-failure' => \$exit_on_plugin_failure, |
55 |
'e|exit-on-plugin-failure' => \$exit_on_plugin_failure, |
| 54 |
); |
56 |
); |
|
Lines 65-70
This script has the following parameters :
Link Here
|
| 65 |
-p --password: password of mail account |
67 |
-p --password: password of mail account |
| 66 |
-t --type: If supplied, only processes this type of message ( email, sms ), repeatable |
68 |
-t --type: If supplied, only processes this type of message ( email, sms ), repeatable |
| 67 |
-c --code: If supplied, only processes messages with this letter code, repeatable |
69 |
-c --code: If supplied, only processes messages with this letter code, repeatable |
|
|
70 |
-x --exclude-code: If supplied, processes all messages except those with this letter code, repeatable |
| 68 |
-l --limit: The maximum number of messages to process for this run |
71 |
-l --limit: The maximum number of messages to process for this run |
| 69 |
-m --method: authentication method required by SMTP server (See perldoc Sendmail.pm for supported authentication types.) |
72 |
-m --method: authentication method required by SMTP server (See perldoc Sendmail.pm for supported authentication types.) |
| 70 |
-h --help: this message |
73 |
-h --help: this message |
|
Lines 89-94
try {
Link Here
|
| 89 |
|
92 |
|
| 90 |
# Remove empty elements, see bug 37075 |
93 |
# Remove empty elements, see bug 37075 |
| 91 |
@letter_code = grep { $_ ne q{} } @letter_code; |
94 |
@letter_code = grep { $_ ne q{} } @letter_code; |
|
|
95 |
@exclude_letter_code = grep { $_ ne q{} } @exclude_letter_code; |
| 92 |
|
96 |
|
| 93 |
C4::Letters::SendQueuedMessages( |
97 |
C4::Letters::SendQueuedMessages( |
| 94 |
{ |
98 |
{ |
|
Lines 99-104
C4::Letters::SendQueuedMessages(
Link Here
|
| 99 |
limit => $limit, |
103 |
limit => $limit, |
| 100 |
type => \@type, |
104 |
type => \@type, |
| 101 |
letter_code => \@letter_code, |
105 |
letter_code => \@letter_code, |
|
|
106 |
exclude_letter_code => \@exclude_letter_code, |
| 102 |
where => $where, |
107 |
where => $where, |
| 103 |
exit_on_plugin_failure => $exit_on_plugin_failure, |
108 |
exit_on_plugin_failure => $exit_on_plugin_failure, |
| 104 |
} |
109 |
} |
| 105 |
- |
|
|