1Email::Simple::Header(3U)ser Contributed Perl DocumentatiEomnail::Simple::Header(3)
2
3
4
6 Email::Simple::Header - the header of an Email::Simple message
7
9 my $email = Email::Simple->new($text);
10
11 my $header = $email->head;
12 print $header->as_string;
13
15 This method implements the headers of an Email::Simple object. It is a
16 very minimal interface, and is mostly for private consumption at the
17 moment.
18
20 new
21 my $header = Email::Simple::Header->new($head, \%arg);
22
23 $head is a string containing a valid email header, or a reference to
24 such a string. If a reference is passed in, don't expect that it won't
25 be altered.
26
27 Valid arguments are:
28
29 crlf - the header's newline; defaults to CRLF
30
31 as_string
32 my $string = $header->as_string(\%arg);
33
34 This returns a stringified version of the header.
35
36 header_names
37 This method returns the unique header names found in this header, in no
38 particular order.
39
40 header_pairs
41 This method returns all the field/value pairs in the header, in the
42 order that they appear in the header.
43
44 header
45 my $first_value = $header->header($field);
46 my @all_values = $header->header($field);
47
48 This method returns the value or values of the given header field. If
49 the named field does not appear in the header, this method returns
50 false.
51
52 header_set
53 $header->header_set($field => @values);
54
55 This method updates the value of the given header. Existing headers
56 have their values set in place. Additional headers are added at the
57 end. If no values are given to set, the header will be removed from to
58 the message entirely.
59
60 crlf
61 This method returns the newline string used in the header.
62
64 This module is maintained by the Perl Email Project
65
66 <http://emailproject.perl.org/wiki/Email::Simple::Header>
67
69 Copyright 2006-2007 by Ricardo SIGNES
70
71 Copyright 2004 by Casey West
72
73 Copyright 2003 by Simon Cozens
74
75 This library is free software; you can redistribute it and/or modify it
76 under the same terms as Perl itself.
77
78
79
80perl v5.12.1 2009-06-30 Email::Simple::Header(3)