| Mail::Identity(3pm) | User Contributed Perl Documentation | Mail::Identity(3pm) |
Mail::Identity - an e-mail role
Mail::Identity is a User::Identity::Item
use User::Identity;
use Mail::Identity;
my $me = User::Identity->new(...);
my $addr = Mail::Identity->new(address => 'x@y');
$me->add(email => $addr);
# Simpler
use User::Identity;
my $me = User::Identity->new(...);
my $addr = $me->add(email => 'x@y');
my $addr = $me->add( email => 'home'
, address => 'x@y');
# Conversion
my $ma = Mail::Address->new(...);
my $mi = Mail::Identity->coerce($ma);
The "Mail::Identity" object contains the description of role played by a human when sending e-mail. Most people have more than one role these days: for instance, a private and a company role with different e-mail addresses.
An "Mail::Identity" object combines an e-mail address, user description ("phrase"), a signature, pgp-key, and so on. All fields are optional, and some fields are smart. One such set of data represents one role. "Mail::Identity" is therefore the smart cousine of the Mail::Address object.
Extends "DESCRIPTION" in User::Identity::Item.
Extends "METHODS" in User::Identity::Item.
Extends "Constructors" in User::Identity::Item.
-Option --Defined in --Default
address <username@domain or name>
charset <user's charset>
comment <user's fullname if phrase is different>
description User::Identity::Item undef
domain <from email or localhost>
language <from user>
location <random user's location>
name User::Identity::Item <phrase or user's fullName>
organization <location's organization>
parent User::Identity::Item undef
pgp_key undef
phrase <user's fullName>
signature undef
username <from address or user's nickname>
Extends "Attributes" in User::Identity::Item.
Comments will be enclosed in parenthesis when used. Parenthesis (matching) or non-matching) which are already in the string will carefully escaped when needed. You do not need to worry.
When an email string is produced, the phase will be quoted if needed. Quotes which are within the string will automatically be escaped, so you do no need to worry: input cannot break the outcome!
Extends "Collections" in User::Identity::Item.
Extends "Searching" in User::Identity::Item.
This module is part of User-Identity distribution version 1.02, built on April 17, 2023. Website: http://perl.overmeer.net/CPAN/
Copyrights 2003-2023 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/
| 2023-06-11 | perl v5.36.0 |