1Test::Smoke::Mailer(3)User Contributed Perl DocumentationTest::Smoke::Mailer(3)
2
3
4
6 Test::Smoke::Mailer - Wrapper to send the report.
7
9 use Test::Smoke::Mailer;
10
11 my %args = ( mhowto => 'smtp', mserver => 'smtp.your.domain' );
12 my $mailer = Test::Smoke::Mailer->new( $ddir, %args );
13
14 $mailer->mail or die "Problem in mailing: " . $mailer->error;
15
17 This little wrapper still allows you to use the sendmail, mail or mailx
18 programs, but prefers to use the Mail::Sendmail module (which comes
19 with this distribution) to send the reports.
20
22 Test::Smoke::Mailer->new( $mailer[, %args] )
23 Can we provide sensible defaults for the mail stuff?
24
25 mhowto => [Module::Name|sendmail|mail|mailx]
26 mserver => an SMTP server || localhost
27 mbin => the full path to the mail binary
28 mto => list of addresses (comma separated!)
29 mfrom => single address
30 mcc => list of addresses (coma separated!)
31
32 $mailer->fetch_report( )
33 "fetch_report()" reads mktest.rpt from "{ddir}" and return the
34 subject line for the mail-message.
35
36 $mailer->error( )
37 "error()" returns the value of "$mailer->{error}".
38
39 $self->_get_cc( $subject )
40 "_get_cc()" implements the "--ccp5p_onfail" option. It looks at the
41 subject to see if the smoke FAILed and then adds the perl5-porters
42 mailing-list to the "Cc:" field unless it is already part of "To:"
43 or "Cc:".
44
45 The new behaviour is to only return "Cc:" on fail. This is
46 determined by the new global regex kept in
47 $Test::Smoke::Mailer::NOCC_RE.
48
49 Test::Smoke::Mailer->config( $key[, $value] )
50 "config()" is an interface to the package lexical %CONFIG, which
51 holds all the default values for the "new()" arguments.
52
53 With the special key all_defaults this returns a reference to a
54 hash holding all the default values.
55
57 This handles sending the message by piping it to the sendmail program.
58
59 Test::Smoke::Mailer::Sendmail->new( %args )
60 Keys for %args:
61
62 * ddir
63 * sendmailbin
64 * to
65 * from
66 * cc
67 * v
68
69 $mailer->mail( )
70 "mail()" sets up a header and body and pipes them to the sendmail
71 program.
72
74 This handles sending the message with either the mail or mailx program.
75
76 Test::Smoke::Mailer::Mail_X->new( %args )
77 Keys for %args:
78
79 * ddir
80 * mailbin/mailxbin
81 * to
82 * cc
83 * v
84
85 $mailer->mail( )
86 "mail()" sets up the commandline and body and pipes it to either
87 the mail or the mailx program.
88
90 This handles sending the message using the Mail::Sendmail module.
91
92 Test::Smoke::Mailer::Mail_Sendmail->new( %args )
93 Keys for %args:
94
95 * ddir
96 * mserver
97 * to
98 * from
99 * cc
100 * v
101
102 $mailer->mail( )
103 "mail()" sets up the message to be send by Mail::Sendmail.
104
106 This handles sending the message using the MIME::Lite module.
107
108 Test::Smoke::Mailer::MIME_Lite->new( %args )
109 Keys for %args:
110
111 * ddir
112 * mserver
113 * to
114 * from
115 * cc
116 * v
117
118 $mailer->mail( )
119 "mail()" sets up the message to be send by MIME::Lite.
120
122 (c) 2002-2003, All rights reserved.
123
124 * Abe Timmerman <abeltje@cpan.org>
125
126 This library is free software; you can redistribute it and/or modify it
127 under the same terms as Perl itself.
128
129 See:
130
131 * <http://www.perl.com/perl/misc/Artistic.html>,
132 * <http://www.gnu.org/copyleft/gpl.html>
133
134 This program is distributed in the hope that it will be useful, but
135 WITHOUT ANY WARRANTY; without even the implied warranty of
136 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
137
138
139
140perl v5.12.1 2008-07-19 Test::Smoke::Mailer(3)