NAME
Mail::Builder::Attachment - Helper module for handling attachments
SYNOPSIS
use Mail::Builder;
my $attachment = Mail::Builder::Attachment('/home/guybrush/2007_10_11_invitation.pdf','invitation.pdf','application/pdf');
$attachment->name('party_invitation.pdf');
print $attachment->serialize;
DESCRIPTION
This is a simple module for handling attachments. The module needs the path to the file and optional an name which will be used for displaying the file in the e-mail and a mime type.
USAGE
new
Simple constructor
Mail::Builder::Attachment->new(PATH[,NAME,MIME]);
path
Accessor which takes/returns the path of the file on the filesystem. The file must be readable.
name
Accessor which takes/returns the name of the file as displayed in the e-mail message. If no name is provided the filename will be extracted from the path attribute.
mime
Accessor which takes/returns the mime type of the file. If no mime type is provided the module tries to determine the correct mime type for the given filename extension. If this fails 'application/octet-stream' will be used.
The automatic recognition is performed when serialize is executed for the first time.
serialize
Returns the attachment as a MIME::Entity object.
AUTHOR
Maroš Kollár
CPAN ID: MAROS
maros [at] k-1.com
http://www.k-1.com
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 284:
Non-ASCII character seen before =encoding in 'Maroš'. Assuming UTF-8