56 |
hash_len => 8, |
hash_len => 8, |
57 |
); |
); |
58 |
|
|
59 |
Parametar C<hash_len> defined length of hash which will be added to each |
Parametar C<hash_len> defines length of hash which will be added to each |
60 |
outgoing e-mail message. |
outgoing e-mail message to ensure that replies can be linked with sent e-mails. |
61 |
|
|
62 |
=cut |
=cut |
63 |
|
|
87 |
|
|
88 |
=head2 new_list |
=head2 new_list |
89 |
|
|
90 |
Create new list |
Create new list. Required arguments are name of C<list> and |
91 |
|
C<email> address. |
92 |
|
|
93 |
$nos->new_list( |
$nos->new_list( |
94 |
list => 'My list", |
list => 'My list', |
95 |
email => 'my-list@example.com', |
email => 'my-list@example.com', |
96 |
); |
); |
97 |
|
|
98 |
Returns ID of newly created list. |
Returns ID of newly created list. |
99 |
|
|
100 |
|
Calls internally L<_add_list>, see details there. |
101 |
|
|
102 |
=cut |
=cut |
103 |
|
|
104 |
sub new_list { |
sub new_list { |
182 |
$nos->add_message_to_list( |
$nos->add_message_to_list( |
183 |
list => 'My list', |
list => 'My list', |
184 |
message => 'Subject: welcome to list |
message => 'Subject: welcome to list |
185 |
|
|
186 |
This is example message |
This is example message |
187 |
', |
', |
188 |
); |
); |
295 |
$m_obj->header_set('From', $from) || croak "can't set From: header"; |
$m_obj->header_set('From', $from) || croak "can't set From: header"; |
296 |
$m_obj->header_set('To', $to) || croak "can't set To: header"; |
$m_obj->header_set('To', $to) || croak "can't set To: header"; |
297 |
|
|
298 |
|
$m_obj->header_set('X-Nos-Version', $VERSION); |
299 |
|
$m_obj->header_set('X-Nos-Hash', $hash); |
300 |
|
|
301 |
# FIXME do real sending :-) |
# FIXME do real sending :-) |
302 |
send IO => $m_obj->as_string; |
send IO => $m_obj->as_string; |
303 |
|
|
412 |
|
|
413 |
Returns C<Class::DBI> object for created list. |
Returns C<Class::DBI> object for created list. |
414 |
|
|
415 |
|
C<email> address can be with domain or without it if your |
416 |
|
MTA appends it. There is no checking for validity of your |
417 |
|
list e-mail. Flexibility comes with resposibility, so please |
418 |
|
feed correct (and configured) return addresses. |
419 |
|
|
420 |
=cut |
=cut |
421 |
|
|
422 |
sub _add_list { |
sub _add_list { |