Server : Apache System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : andertr9 ( 1047) PHP Version : 8.2.18 Disable Function : NONE Directory : /usr/share/doc/perl-MailTools-2.12/ |
Upload File : |
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: [my email address] Newsgroups: In-Reply-To: References: Reply-To: [my email address] From: [my email address] Subject: --%<----%<----%<----%<----%<----%<----%<-- Any addresses that are included on the Bcc line above will be excluded from appearing on either the To or Cc lines. 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.