1Email::MIME::AttachmentU:s:eSrtrCiopnpterri(b3u)ted PerlEmDaoiclu:m:eMnItMaEt:i:oAnttachment::Stripper(3)
2
3
4

NAME

6       Email::MIME::Attachment::Stripper - strip the attachments from an email
7

VERSION

9       version 1.316
10

SYNOPSIS

12               my $stripper = Email::MIME::Attachment::Stripper->new($mail);
13
14               my $msg = $stripper->message;
15               my @attachments = $stripper->attachments;
16

DESCRIPTION

18       Given a Email::MIME object, detach all attachments from the message and
19       make them available separately.
20
21       The message you're left with might still be multipart, but it should
22       only be multipart/alternative or multipart/related.
23
24       Given this message:
25
26         + multipart/mixed
27           - text/plain
28           - application/pdf; disposition=attachment
29
30       The PDF will be stripped.  Whether the returned message is a single
31       text/plain part or a multipart/mixed message with only the text/plain
32       part remaining in it is not yet guaranteed one way or the other.
33

METHODS

35   new
36               my $stripper = Email::MIME::Attachment::Stripper->new($email, %args);
37
38       The constructor may be passed an Email::MIME object, a reference to a
39       string, or any other value that Email::Abstract (if available) can cast
40       to an Email::MIME object.
41
42       Valid arguments include:
43
44         force_filename - try harder to get a filename, making one up if necessary
45
46   message
47               my $email_mime = $stripper->message;
48
49       This returns the message with all the attachments detached. This will
50       alter both the body and the header of the message.
51
52   attachments
53               my @attachments = $stripper->attachments;
54
55       This returns a list of all the attachments we found in the message, as
56       a hash of { filename, content_type, payload }.
57
58       This may contain parts that might not normally be considered
59       attachments, like text/html or multipart/alternative.
60

PERL EMAIL PROJECT

62       This module is maintained by the Perl Email Project
63
64       <http://emailproject.perl.org/wiki/Email::MIME::Attachment::Stripper>
65

AUTHOR

67       Currently maintained by Ricardo SIGNES <rjbs@cpan.org>
68
69       Written by Casey West <casey@geeknest.com>
70

CREDITS AND LICENSE

72       This module is incredibly closely derived from Tony Bowden's
73       Mail::Message::Attachment::Stripper; this derivation was done by Simon
74       Cozens ("simon@cpan.org"), and you receive this under the same terms as
75       Tony's original module.
76
77
78
79perl v5.12.0                      2009-01-2E4mail::MIME::Attachment::Stripper(3)
Impressum