Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mail::mboxparser::mail::convertable(3pm) [debian man page]

MboxParser::Mail::Convertable(3pm)			User Contributed Perl Documentation			MboxParser::Mail::Convertable(3pm)

NAME
Mail::MboxParser::Mail::Convertable - convert mail for sending etc. SYNOPSIS
use Mail::MboxParser; [...] # $msg is a Mail::MboxParser::Mail-object my $mail = $msg->make_convertable; $mail->delete_from_header('date', 'message-id'); $mail->replace_in_header('to', 'john.doe@foobar.com'); $mail->add_to_header( ['cc', 'john.does.brother@foobar.com'], where => 'BEHIND' ); $mail->send('sendmail'); DESCRIPTION
This class adds means to convert an email object into something that could be send via SMTP, NNTP or dumped to a file or filehandle. Therefore, methods are provided that change the structure of an email which includes adding and removing of header-fields, MIME-parts etc and transforming them into objects of related modules. Currently, only basic manipulation of the header and sending using Mail::Mailer is provided. More is to come soon. This class works non-destructive. You first create a Convertable-object and do any modifications on this while the Mail-object from which it was derived will not be touched. METHODS
delete_from_header(header-fields) Given a list of header-field names, these fields will be removed from the header. If you want to re-send a message, you could for instance remove the cc-field cause otherwise the message would be carbon-copied to the addresses listed in the cc-field. add_to_header(array-ref) add_to_header(array-ref, where => 'BEFORE' | 'BEHIND') add_to_header() takes a reference to a two-element list whose first element specifies the header-field to add or to add to while the second elements specifies the data that should be added. 'where' specifies whether to add at the beginning or at the end of the header. Defaults to 'BEHIND' if not given. replace_in_header(header-field, new_data) First element must be the header-field to be replaced while the second argument must be a string indicating what will be the new content of the header-field. send(command, args) Literally inherited from Mail::Internet. Commands can be "mail" (using the UNIX-mail program), "sendmail" (using a configured sendmail or compatible MTA like exim), "smtp" (for using Net::SMTP) and "test" which will only display what would be sent using /bin/echo. Additional arguments will be passed on to Mail::Mailer->new() which is in fact what Mail::Internet->send() uses. For more details, see Mail::Mailer VERSION
This is version 0.55. AUTHOR AND COPYRIGHT
Tassilo von Parseval <tassilo.von.parseval@rwth-aachen.de> Copyright (c) 2001-2005 Tassilo von Parseval. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Mail::Internet, Mail::Mailer perl v5.12.3 2005-12-08 MboxParser::Mail::Convertable(3pm)

Check Out this Related Man Page

Mail::Send(3)						User Contributed Perl Documentation					     Mail::Send(3)

NAME
Mail::Send - Simple electronic mail interface SYNOPSIS
require Mail::Send; $msg = Mail::Send->new; $msg = Mail::Send->new(Subject => 'example', To => 'timbo'); $msg->to('user@host'); $msg->to('user@host', 'user2@example.com'); $msg->subject('example subject'); $msg->cc('user@host'); $msg->bcc('someone@else'); $msg->set($header, @values); $msg->add($header, @values); $msg->delete($header); # Launch mailer and set headers. The filehandle returned # by open() is an instance of the Mail::Mailer class. # Arguments to the open() method are passed to the Mail::Mailer # constructor. $fh = $msg->open; # some default mailer $fh = $msg->open('sendmail'); # explicit print $fh "Body of message"; $fh->close # complete the message and send it or die "couldn't send whole message: $! "; DESCRIPTION
Mail::Send creates e-mail messages without using the Mail::Header knowledge, which means that all escaping and folding must be done by you! Simplicity has its price. When you have time, take a look at Mail::Transport METHODS
Constructors Mail::Send->new(PAIRS) A list of header fields (provided as key-value PAIRS) can be used to initialize the object. Header fields $obj->add(FIELDNAME, VALUES) Add values to the list of defined values for the FIELDNAME. $obj->bcc(VALUES) $obj->cc(VALUES) $obj->delete(FIELDNAME) $obj->set(FIELDNAME, VALUES) VALUES will replace the old values for the FIELDNAME. Returned is the LIST of values after modification. $obj->subject(VALUES) $obj->to(VALUES) Sending $obj->open(OPTIONS) The OPTIONS are used to initiate a mailer object via Mail::Mailer::new(). Then Mail::Mailer::open() is called with the knowledge collected in this Mail::Send object. SEE ALSO
This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/. AUTHORS
The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development. Mail::Cap by Gisle Aas <aas@oslonett.no>. Mail::Field::AddrList by Peter Orbaek <poe@cit.dk>. Mail::Mailer and Mail::Send by Tim Bunce <Tim.Bunce@ig.co.uk>. For other contributors see ChangeLog. LICENSE
Copyrights 1995-2000 Graham Barr <gbarr@pobox.com> and 2001-2007 Mark Overmeer <perl@overmeer.net>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.18.2 2014-01-05 Mail::Send(3)
Man Page