DADA::MailingList::Subscribers
This module inherites everything from a Child Module, via @ISA, shared methods should be placed in here.
my ($status, $errors) = $lh->subscription_check(-Email => $email, -Type => 'list');
returns a $status (1 or 0) and a hashref of %$errors. If there are any errors, the $status will be 0, it's a nice shorthand though.
The errors, which are fairly self-explainitory are as follows:
You can skip any of the tests by passing the -Skip argument, like so:
my ($status, $errors) = $lh->subscription_check(
-Email => $email,
-Skip => [qw(blacklisted closed_list)]
);
Unless you have a special case, always use this method to validate an email subscription.
my ($status, $errors) = $lh->unsubscription_check(-Email => $email);
Like the subscription_check method, this method returns a $status and a hashref of $%errors when checking the validity of an unsubscription. The following errors may be returned:
Again, any of these tests can be skipped using the -Skip argument.
my ($xml, $status, $errors) = $lh->subscription_check_xml(-Email => $email);
Same as subscription_check but also returns an XML document describing the same thing.
The XML doc is as so:
<subscription> <email>some@where.com</email> <status>1</status> <errors> <error>no_list</error> </errors> </subscription>
This method returns the filename to a temporary file that holds a copy of the subscription list.
DADA::MailingList::Subscribers::PlainText
Copyright (c) 1999-2007 Justin Simoni All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.