- LICENSE AND COPYRIGHT
MIME::Signature - appends signature to mail messages
my $ms = MIME::Signature->new( plain => 'Das ist der Rand von Ostermundigen.' ); $ms->parse( \*STDIN ); $ms->append; $ms->entity->print;
my $ms = MIME::Signature->new( plain => 'Das ist der Rand von Ostermundigen.' ); my $entity = MIME::Parser->new->parse( \*STDIN ); $ms->append($entity); $entity->print;
MIME::Signature->new( plain => 'Das ist der Rand von Ostermundigen.', parse => \*STDIN )->append->print;
This module appends a signature to an e-mail messages. It tries its best to cope with any encodings and MIME structures.
Constructs a MIME::Signature object. You may optionally pass additional method => argument pairs as a shortcut to calling the respective methods. (This only works for methods which require exactly one argument.)
Sets and/or returns the plaintext version of the signature to append.
Sets and/or returns the enriched text version of the signature to append.
Sets and/or returns the HTML version of the signature to append. If not given, will be automatically deducted from the plaintext version.
Sets and/or returns the delimiter to insert before the signature within a text/plain part.
Sets and/or returns the delimiter to insert before the signature within a text/enriched part.
Sets and/or returns the delimiter to insert before the signature within a text/html part.
Gets or sets the MIME::Parser object used by the
parse*methods mentioned above. If you do not supply a parser object, MIME::Signature will create one by itself as needed.
Gets or sets the MIME::Entity object which stores the mail message.
When given a true value as argument, multipart/signed parts of the message will automatically be removed during ->append, so that we can append a (text) signature without invalidating the (cryptographic) signature.
Appends the signature to the MIME::Entity stored in the MIME::Signature object. Alternatively you may supply a MIME::Entity object yourself which will then not be stored in the MIME::Signature object. In any case, the MIME::Entity object will be modified as the signature is added. Returns the MIME::Entity object.
This method will die if it cannot append a signature, e.g. because the mail does not contain a text/plain and/or text/html part or if the text is enclosed in a multipart/signed part and you have not specified "->unsign".
The module uses the following methods to handle the respective MIME types. You may overwrite them and/or provide likely named additional handler methods to deal with other types.
The method gets passed the MIME part in question. It should alter this part if it wants to append the signature. It is expected to return a boolean value to signal success. That is, "->append" will croak when a handler method returns false.
appends the signature to any contained part
appends another part with the signature inside
appends the signature to the first contained part
If "-unsign" is set, replaces the multipart/signed part by the first part it contains.
Returns false otherwise.
appends the HTML version of the signature to the end of the
appends the enriched text version of the signature
appends the plain version of the signature
Martin H. Sluka,
Please report any bugs or feature requests to
bug-mime-signature at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=MIME-Signature. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
Copyright 2018 Martin H. Sluka.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.