| Mail-Builder documentation | view source | Contained in the Mail-Builder distribution. |
Mail::Builder::Attachment - Class for handling e-mail attachments
use Mail::Builder::Attachment;
my $attachment1 = Mail::Builder::Attachment->new({
file => 'path/to/attachment.pdf',
name => 'LoveLetter.txt.vbs',
});
my $attachment2 = Mail::Builder::Attachment->new($fh);
my $attachment_entity = $attachment1->serialize;
This class handles e-mail attachments for Mail::Builder.
The constructor can be called in multiple ways
Mail::Builder::Attachment->new({
file => Path | Path::Class::File | IO::File | FH | ScalarRef,
[ name => Attachment filename, ]
[ mimetype => MIME type, ]
})
OR
Mail::Builder::Image->new(
Path | Path::Class::File | IO::File | FH | ScalarRef
[, Attachment filename [, MIME type ]]
)
See Accessors for more details.
Returns the attachment as a MIME::Entity object.
If possible, returns the filename of the attachment file as a Path::Class::File object.
Returns the content of the attachment file.
If possible, returns a filehandle for the attachment file as a IO::File object.
Name of the attachment as used in the e-mail message. If no name is provided the current filename will be used.
Mime type of the attachment. Valid types are
If not provided the mime type is determined by analyzing the filename extension.
Attachment file. Can be a
Maroš Kollár
CPAN ID: MAROS
maros [at] k-1.com
http://www.k-1.com
| Mail-Builder documentation | view source | Contained in the Mail-Builder distribution. |