See METHODS in Mail::Reporter
Duplicate the message. The result will again be a Mail::Internet compatible object.
Remove all data from this object. Very dangerous!
Option | Defined in | Default |
---|---|---|
Body |
| |
FoldLength | 79 | |
Header |
| |
MailFrom |
| |
Modify | 0 | |
body | Mail::Message | undef |
body_type | Mail::Message | |
deleted | Mail::Message | <false> |
field_type | Mail::Message | undef |
head | Mail::Message | undef |
head_type | Mail::Message | |
labels | Mail::Message | {} |
log | Mail::Reporter |
|
messageId | Mail::Message | undef |
modified | Mail::Message | <false> |
trace | Mail::Reporter |
|
trusted | Mail::Message | <false> |
# was use Mail::Internet; my $mi = Mail::Internet->new(@options); # becomes use Mail::Message::Replace::MailInternet; my $mi = Mail::Internet->new(@options);
The ARGS data can only be a file handle or an ARRAY. Other data types are not supported (see read() if you want to have more).
Your email address.
Replaced by sign(), but still usable. $filename is the file which
contains the signature, which defaults to $ENV{HOME}/.signature
.
Read header and body from an ARRAY or $fh
Read header and body from the specified ARRAY or $fh. When used as object method, Mail::Message::read() is called, to be MailBox compliant. As class method, the Mail::Internet compatible read is called. %options are only available in the first case.
Option | Defined in | Default |
---|---|---|
body_type | Mail::Message::Construct::Read |
|
strip_status_fields | Mail::Message::Construct::Read | <true> |
Read only the message's body from the ARRAY or $fh.
Read only the message's header from the ARRAY or $fh
BE WARNED: the main job for creating a reply is done by Mail::Message::reply(), which may produce a result which is compatible, but may be different from Mail::Internet's version.
Option | Defined in | Default |
---|---|---|
Bcc | Mail::Message::Construct::Reply | undef |
Cc | Mail::Message::Construct::Reply | <'cc' in current> |
Exclude | [] | |
From | Mail::Message::Construct::Reply | <'to' in current> |
Inline | > | |
Keep | [] | |
Message-ID | Mail::Message::Construct::Reply | <uniquely generated> |
ReplyAll | <false> | |
Subject | Mail::Message::Construct::Reply | |
To | Mail::Message::Construct::Reply | <sender in current> |
body | Mail::Message::Construct::Reply | undef |
group_reply | Mail::Message::Construct::Reply | <true> |
header_template |
| |
include | Mail::Message::Construct::Reply |
|
max_signature | Mail::Message::Construct::Reply |
|
message_type | Mail::Message::Construct::Reply | |
postlude | Mail::Message::Construct::Reply | undef |
prelude | Mail::Message::Construct::Reply | undef |
quote | Mail::Message::Construct::Reply | '> ' |
signature | Mail::Message::Construct::Reply | undef |
strip_signature | Mail::Message::Construct::Reply |
|
Add a signature (a few extra lines) to the message.
Option | Default |
---|---|
File |
|
Signature | '' |
Send an NNTP message (newsgroup message), which is equivalent to
Mail::Transport::NNTP or Mail::Message::send() with via 'nntp'
.
Option | Default |
---|---|
Debug | <false> |
Host | <from Net::Config> |
Port | 119 |
Prints the whole message to the specified $fh, which default to STDOUT. This calls Mail::Message::print().
Send via Mail Transfer Agents (MUA). These will be handled by various
Mail::Transport::Send extensions. The test
$type is not supported.
Add header lines, which simply calls Mail::Message::Head::add()
on
the header for each specified LINE. The last added LINE is returned.
Not to be used, replaced by header().
Not implemented, because I see no use for it.
Delete the fields with the specified $name. The deleted fields are returned.
BE WARNED: if no $name is specified, the delete
is interpreted as
the deletion of the message in a folder, so Mail::Box::Message::delete()
will be called. This may have no negative effect at all...
Fold all the fields to a certain maximum $length. Implemented by Mail::Message::Replace::MailHeader::fold()
Set the maximum line $length. $tag is ignored. Implemented by Mail::Message::Replace::MailHeader::fold_length()
Get all the header fields with the specified $name. In scalar context, only the first fitting $name is returned. Even when only one $name is specified, multiple lines may be returned: some fields appear more than once in a header. Calls Mail::Message::Replace::MailHeader::get()
Returns the head of the message, or creates an empty one if none is
defined. The $head argument, which sets the header, is not available
for Mail::Internet, but is there to be compatible with the head
method of Mail::Message.
Optionally reads a header from the ARRAY, and then returns those fields as array-ref nicely folded. Implemented by Mail::Message::Replace::MailHeader::header()
Adds LINES to the header, but removes fields with the same name if they already exist. Calls Mail::Message::Replace::MailHeader::replace()
No effect anymore (always performed).
Returns an ARRAY of lines, representing the body. With arguments, a new body will be created. In Mail::Internet, the body is not an object but a simple array.
BE WARNED: this overrules the Mail::Message::body() method, which may cause some confusion. Use bodyObject() to get access to that body's data.
Calls Mail::Message::body(), because that body
method is overruled
by the one which has a Mail::Internet compatible interface.
Prints the body to the specified $fh, which defaults to STDOUT. This calls Mail::Message::Body::print().
Remove the signature of a message with a maximum of $nrlines lines, which defaults to 10. The work is done on the decoded body content, by Mail::Message::Body::stripSignature().
This method is calling Mail::Message::send() via smtp
, which is
implemented in Mail::Transport::SMTP. The implementation is
slightly different, so this method is not 100% compliant.
Option | Default |
---|---|
Debug | <false> |
Hello | <helo_domain from Net::Config> |
Host |
|
MailFrom |
|
Port | 25 |
Removes blank lines from begin and end of the body.
Returns the whole message as one string, which can be included in an
MBOX folder (while not using Mail::Box::Mbox). Lines in the body
which start with From
are escaped with an >.
Coerce (adapt type) of the specified $message (anything Mail::Message::coerce() accepts) into an Mail::Internet simulating object.