perldoc > Mail::Identity

📛 NAME

Mail::Identity - an e-mail role

🧬 INHERITANCE

Mail::Identity is a User::Identity::Item

🚀 Quick Reference

Use CaseCommandDescription
Create new identityMail::Identity->new(address => 'x@y')Instantiate with email address
Add email to user$me->add(email => $addr)Attach identity to a user
Quick add from user$me->add(email => 'x@y')One-liner to create and add
Add with name label$me->add(email => 'home', address => 'x@y')Label the identity
Coerce from Mail::AddressMail::Identity->coerce($ma)Convert from a Mail::Address object
Get address$obj->address()Returns the email address
Get phrase$obj->phrase()Returns the display name
Get organization$obj->organization()Returns the associated organization
Get location$obj->location()Returns the location object

📋 SYNOPSIS

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);

📖 DESCRIPTION

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.

🛠️ METHODS

Extends "METHODS" in User::Identity::Item.

🏗️ Constructors

Extends "Constructors" in User::Identity::Item.

Mail::Identity->new( [$name], %options )
OptionDefined inDefault
address<username@domain or name>
charset<user's charset>
comment<user's fullname if phrase is different>
descriptionUser::Identity::Itemundef
domain<from email or localhost>
language<from user>
location<random user's location>
nameUser::Identity::Item<phrase or user's fullName>
organization<location's organization>
parentUser::Identity::Itemundef
pgp_keyundef
phrase<user's fullName>
signatureundef
username<from address or user's nickname>
address => STRING The e-mail address is constructed from the username/domain, but when both do not exist, the name is taken. charset => STRING comment => STRING description => STRING domain => STRING language => STRING location => NAME|OBJECT The user's location which relates to this mail identity. This can be specified as location name (which will be looked-up when needed), or as User::Identity::Location object. name => STRING organization => STRING Usually defined for e-mail addresses which are used by a company or other organization, but less common for personal addresses. This value will be used to fill the "Organization" header field of messages. parent => OBJECT pgp_key => STRING|FILENAME phrase => STRING signature => STRING username => STRING

📋 Attributes

Extends "Attributes" in User::Identity::Item.

📦 Collections

Extends "Collections" in User::Identity::Item.

🔍 Searching

Extends "Searching" in User::Identity::Item.

🩺 DIAGNOSTICS

📚 SEE ALSO

This module is part of User-Identity distribution version 1.01, built on February 11, 2022. Website: http://perl.overmeer.net/CPAN/

⚖️ LICENSE

Copyrights 2003-2022 by [Mark Overmeer <markov AT 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/

Mail::Identity
📛 NAME 🧬 INHERITANCE 🚀 Quick Reference 📋 SYNOPSIS 📖 DESCRIPTION 🛠️ METHODS
🏗️ Constructors 📋 Attributes 📦 Collections 🔍 Searching
🩺 DIAGNOSTICS 📚 SEE ALSO ⚖️ LICENSE

Generated by phpman v4.9.29 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-20 18:33 @2600:1f28:365:80b0:8802:8bb4:3873:328e
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^