1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
The bin directory contains some demos to show the use of the Mail library
To make these demos first type
perl Makefile.PL
make
replyto_demo/forwd_demo/send_demo
these demos will not be installed by make install and will directly
reference the source directory.
With a few small modifications these
scripts can be made to use the installed files and can be of general
use. In fact these are very close copies of the scripts I use
to send/forward/reply to mail.
Each of the scripts except an Internet message as input.
forwd_demo & rplyto_demo both read ~/.mailhdr as an empty header template
for the new mail. Mine looks like
--%<----%<----%<----%<----%<----%<----%<--
To:
Cc:
Bcc: gbarr@ti.com,graham.barr@tiuk.ti.com
Newsgroups:
In-Reply-To:
References:
Reply-To: <gbarr@ti.com>
Return-Path: <gbarr@ti.com>
From: Graham Barr <gbarr@ti.com>
Organization: Texas Instruments Ltd. - via, but not speaking for
Subject:
--%<----%<----%<----%<----%<----%<----%<--
Any addresses that are included on the Bcc line above will be excluded from
appearing on either the To or Cc lines.
gbarr@ti.com,graham.barr@tiuk.ti.com are both message ids for myself
forwd_demo:
This creates a file under /tmp which contains an Internet message
with empty headers and the input message included in the body.
rplyto_demo:
This creates a file under /tmp which contains an Internet message
with headers filled in to send the message to all people who originally
received the message and the input message quoted in the body.
send_demo:
This takes an Internet message as input and uses sendmail to send the message.
It also allows the user to defined aliases in thier ~/.mailrc file in the
same format as would be expected by binmail
alias name expansion
If you have News::NNTPClient installed then this script can also be used to post
to a newsgroup by adding a Newsgroups: line into the header an passing a -post
option on the cmdline.
|