1Mail::Send(3) User Contributed Perl Documentation Mail::Send(3)
2
3
4
6 Mail::Send - Simple electronic mail interface
7
9 require Mail::Send;
10
11 $msg = new Mail::Send;
12
13 $msg = new Mail::Send Subject=>'example subject', To=>'timbo';
14
15 $msg->to('user@host');
16 $msg->to('user@host', 'user2@example.com');
17 $msg->subject('example subject');
18 $msg->cc('user@host');
19 $msg->bcc('someone@else');
20
21 $msg->set($header, @values);
22 $msg->add($header, @values);
23 $msg->delete($header);
24
25 # Launch mailer and set headers. The filehandle returned
26 # by open() is an instance of the Mail::Mailer class.
27 # Arguments to the open() method are passed to the Mail::Mailer
28 # constructor.
29
30 $fh = $msg->open; # some default mailer
31 # $fh = $msg->open('sendmail'); # explicit
32
33 print $fh "Body of message";
34
35 $fh->close; # complete the message and send it
36
37 $fh->cancel; # not yet implemented
38
41 Mail::Mailer
42
44 Maintained by Mark Overmeer <mailtools@overmeer.net>
45
46 Original code written by Tim Bunce <Tim.Bunce@ig.co.uk>, with a kick
47 start from Graham Barr <gbarr@pobox.com>. With contributions by Gerard
48 Hickey <hickey@ctron.com>
49
50 Copyright (c) 2002-2003 Mark Overmeer. All rights reserved. This pro‐
51 gram is free software; you can redistribute it and/or modify it under
52 the same terms as Perl itself.
53
54
55
56perl v5.8.8 2007-05-11 Mail::Send(3)