Lines 1026-1035
ENDSQL
Link Here
|
1026 |
|
1026 |
|
1027 |
=head2 SendQueuedMessages ([$hashref]) |
1027 |
=head2 SendQueuedMessages ([$hashref]) |
1028 |
|
1028 |
|
1029 |
my $sent = SendQueuedMessages({ verbose => 1, limit => 50 }); |
1029 |
my $sent = SendQueuedMessages({ |
|
|
1030 |
letter_code => $letter_code, |
1031 |
borrowernumber => $who_letter_is_for, |
1032 |
limit => 50, |
1033 |
verbose => 1 |
1034 |
}); |
1035 |
|
1036 |
Sends all of the 'pending' items in the message queue, unless |
1037 |
parameters are passed. |
1030 |
|
1038 |
|
1031 |
Sends all of the 'pending' items in the message queue, unless the optional |
1039 |
The letter_code, borrowernumber and limit parameters are used |
1032 |
limit parameter is passed too. The verbose parameter is also optional. |
1040 |
to build a parameter set for _get_unsent_messages, thus limiting |
|
|
1041 |
which pending messages will be processed. They are all optional. |
1042 |
|
1043 |
The verbose parameter can be used to generate debugging output. |
1044 |
It is also optional. |
1033 |
|
1045 |
|
1034 |
Returns number of messages sent. |
1046 |
Returns number of messages sent. |
1035 |
|
1047 |
|
Lines 1229-1243
sub ResendMessage {
Link Here
|
1229 |
|
1241 |
|
1230 |
=head2 _add_attachements |
1242 |
=head2 _add_attachements |
1231 |
|
1243 |
|
1232 |
named parameters: |
1244 |
named parameters: |
1233 |
letter - the standard letter hashref |
1245 |
letter - the standard letter hashref |
1234 |
attachments - listref of attachments. each attachment is a hashref of: |
1246 |
attachments - listref of attachments. each attachment is a hashref of: |
1235 |
type - the mime type, like 'text/plain' |
1247 |
type - the mime type, like 'text/plain' |
1236 |
content - the actual attachment |
1248 |
content - the actual attachment |
1237 |
filename - the name of the attachment. |
1249 |
filename - the name of the attachment. |
1238 |
message - a MIME::Lite object to attach these to. |
1250 |
message - a MIME::Lite object to attach these to. |
1239 |
|
1251 |
|
1240 |
returns your letter object, with the content updated. |
1252 |
returns your letter object, with the content updated. |
1241 |
|
1253 |
|
1242 |
=cut |
1254 |
=cut |
1243 |
|
1255 |
|
Lines 1273-1278
sub _add_attachments {
Link Here
|
1273 |
|
1285 |
|
1274 |
} |
1286 |
} |
1275 |
|
1287 |
|
|
|
1288 |
=head2 _get_unsent_messages |
1289 |
|
1290 |
This function's parameter hash reference takes the following |
1291 |
optional named parameters: |
1292 |
message_transport_type: method of message sending (e.g. email, sms, etc.) |
1293 |
borrowernumber : who the message is to be sent |
1294 |
letter_code : type of message being sent (e.g. PASSWORD_RESET) |
1295 |
limit : maximum number of messages to send |
1296 |
|
1297 |
This function returns an array of matching hash referenced rows from |
1298 |
message_queue with some borrower information added. |
1299 |
|
1300 |
=cut |
1301 |
|
1276 |
sub _get_unsent_messages { |
1302 |
sub _get_unsent_messages { |
1277 |
my $params = shift; |
1303 |
my $params = shift; |
1278 |
|
1304 |
|
1279 |
- |
|
|