NAME
Multipart.pm
SYNOPSIS
$smtp = Net::SMTP::MultiPart->new("mailrelay.someco.com");
$smtp->Header(To => "someone\@someco.com",
Subj => "Multipart Mail Demo",
From => "me\@someco.com");
$smtp->Text("This is the first text part of the message");
$smtp->FileAttach("c:/tmp/myfile.xls");
$smtp->End();
DESCRIPTION
This module uses the Net::SMTP and Mime::Base64 modules to compose and send multipart mail messages. It uses the Net::SMTP methods, but simplifies formatting of multipart messages using its internal methods Header, Text, FileAttach and End.
METHODS
- new
-
The new method invokes a new instance of the Net::SMTP::Multipart class, using the same arguments as the parent method.
- Header
-
The Header method creates the header of the multipart message. It should be called with the following arguments
- To
-
an array of mail addresses to which the mail is to be sent
- From
-
the mail address from which the mail is sent
- Subj
-
the subject title of the mail
- Text
-
This method generates a text part to the message. The argument provided is treated as text and populates the text part of the message.
- FileAttach
-
This method includes a file (identified in the argument when this is called) within an encoded part of the message.
- End
-
This method generates an epilogue part to the message. The argument provided is treated as text and populates the epilogue (which most mail agents do not display). The mail message is then sent and the class instance destroyed.
REQUIRED MODULES
Carp
MIME::Base64
Net::SMTP
strict
vars
SEE ALSO
EXAMPLES
TO DO
AUTHOR
Dave Roberts
SUPPORT
You can send bug reports and suggestions for improvements on this module to me at DaveRoberts@iname.com. However, I can't promise to offer any other support for this script.
COPYRIGHT
This script is Copyright © 2002 Dave Roberts. All rights reserved.
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The copyright holder of this script can not be held liable for any general, special, incidental or consequential damages arising out of the use of the script.
CHANGE HISTORY
$Log: Multipart.pm $ Revision 1.4 2002/04/05 11:36:33 Dave.Roberts change to version number generation code
Revision 1.3 2002/03/27 09:16:29 Dave.Roberts initial pod added
Revision 1.2 2002/03/26 12:03:23 Dave.Roberts added basic pod structure
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 263:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252