Mail::SimpleList::Alias - object representing a temporary mailing list
use Mail::SimpleList::Alias; my $alias = Mail::SimpleList::Alias->new( owner => 'email@example.com', members => [ 'firstname.lastname@example.org', 'email@example.com', 'firstname.lastname@example.org' ], );
A Mail::SimpleList::Alias object represents a temporary mailing list within Mail::SimpleList. It contains all of the attributes of the list and provides methods to query and to set them. The current attributes are
new( %options )
new()creates a new Mail::SimpleList::Alias object. Pass in a hash of attribute options to set them. By default,
auto_addis true, and
Returns a reference to an array of the subscribed addresses.
add( @addresses )
Adds a list of addresses to the Alias object. Duplicate addresses are not added. Returns a list of addresses that were actually added. This method tries very hard to add only the canonical representation of an address to prevent duplication.
remove_address( $address )
Removes an address from the Alias. Returns true or false if the address could be removed. If the owner of the list is removed, the
ownerattribute will be cleared.
Returns a reference to a hash of valid attributes for Alias objects. This allows you to see which attributes you should actually care about.
owner( [ $new_owner ] )
$new_owner, the e-mail address of a new owner, adds him to the alias if he is not already subscribed and makes him the new list owner. If the argument is not provided, returns the address of the current owner.
closed( [ $new_closed ] )
$new_closed, updates the
closedattribute of the Alias and returns the new value. If the argument is not provided, returns the current value.
expires( [ $new_expires ] )
$new_expires, updates the
expiresattribute of the Alias and returns the new value. If the argument is not provided, returns the current value.
auto_add( [ $new_auto_add ] )
$new_auto_add, updates the
auto_addattribute of the Alias and returns the new value. If the argument is not provided, returns the current value.
description( [ $new_description ] )
$new_description, updates the
descriptionattribute of the Alias and returns the new value. If the argument is not provided, returns the current value.
name( [ $new_name ] )
$new_name, updates the
nameattribute of the Alias and returns the new value. If the argument is not provided, returns the current value. Note that this attribute is not saved; it is not intrinsic to the behavior of the Alias at all. Also note that only numbers, letters, the underscore, and the hyphen characters are allowed.
email@example.com, with helpful suggestions from friends, family, and peers. Allison Randal suggested the
No plans. It's pretty nice as it is.
Mail::Action::Address, the parent class.
Copyright (c) 2003 - 2016 chromatic. All rights reserved. This module is distributed under the same terms as Perl 5.30, in the hope that it is useful but under no warranty.