Returns the string() value.
Returns the address group as string. When no name is specified, it will
only be a comma separated list of addresses. With a name, the groups
name will be prepended and a semi-colon appended. When no addresses
where included and there is no name, then undef
is returned.
Coerce an $object into a Mail::Message::Field::AddrGroup. Currently, you can only coerce User::Identity::Collection::Emails (which is the base class for this one) into this one.
Add one e-mail address to the list which is maintained in the group. This is a wrapper around addRole() adding flexibility on how addresses are specified. An $address can be anything which is acceptable for Mail::Message::Field::Address::coerce() or a list of options which will create such an object.
my @data = (full_name => "Myself", address => 'me@tux.org'); $group->addAddress(@data); my $addr = Mail::Message::Field::Address->new(@data); $group->addAddress(@data); my $ma = Mail::Address->new(...); $group->addAddress($ma);
Returns all addresses defined in this group. The addresses will be ordered alphabetically to make automated testing possible: roles are stored in a hash, so have an unpredictable order by default.
my @addrs = $group->addresses; my @addrs = map { $_->address } $self->roles; #same