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.317
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

ATTENTION!

62       This module's behavior has never been very clearly spelled out, and it
63       has led to misunderstandings and bug reports, which may or may not be
64       actual bugs.  I plan to take some significant action to address this.
65       To read more or comment, please see
66       <https://github.com/rjbs/Email-MIME-Attachment-Stripper/issues/2>
67

CREDITS AND LICENSE

69       This module is incredibly closely derived from Tony Bowden's
70       Mail::Message::Attachment::Stripper; this derivation was done by Simon
71       Cozens ("simon@cpan.org"), and you receive this under the same terms as
72       Tony's original module.
73

AUTHOR

75       Simon Cozens
76
78       This software is copyright (c) 2004 by Simon Cozens.
79
80       This is free software; you can redistribute it and/or modify it under
81       the same terms as the Perl 5 programming language system itself.
82
83
84
85perl v5.32.0                      2020-07-2E8mail::MIME::Attachment::Stripper(3)
Impressum