NAME

DADA::MailingList::Subscribers

This module inherites everything from a Child Module, via @ISA, shared methods should be placed in here.


Methods

subscription_check

        my ($status, $errors) =  $lh->subscription_check(-Email => $email);

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 bey 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.

unsubscription_check

        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.

subscription_check_xml

        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>

write_plaintext_list

This method returns the filename to a temporary file that holds a copy of the subscription list.


SEE ALSO

DADA::MailingList::Subscribers::PlainText