NAME
Mail::Builder::Address - Module for handling e-mail addresses
SYNOPSIS
use
Mail::Builder;
my
= Mail::Builder::Address->new(
'mightypirate@meele-island.mq'
,
'Gaybrush Thweedwood'
);
# Now correct type in the display name and address
->name(
'Guybrush Threepwood'
);
->email(
'verymightypirate@meele-island.mq'
);
# Serialize
->serialize;
# Use the address as a recipient for Mail::Builder object
$mb
->to(
);
# This removes all other recipients
OR
$mb
->to->add(
);
DESCRIPTION
This is a simple module for handling e-mail addresses. It can store the address and an optional display name.
METHODS
Constructor
new
Mail::Builder::Address->new(EMAIL[,DISPLAY NAME]);
Simple constructor
Public Methods
serialize
Prints the address as required for creating the e-mail header.
compare
$obj
->compare(OBJECT);
or
$obj
->compare(E-MAIL);
Checks if two address objects contain the same e-mail address. Returns true or false. The compare method does not check if the address names of the two objects are identical.
Instead of a Mail::Builder::Address
object you can also pass a scalar value representing the e-mail address.
Accessors
name
Display name
E-mail address. Will be checked with Email::Valid