]>
git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - scripts/makemail
3 #-----------------------------------------------------------------------------
4 # All this does is generate RFC 822 headers and then copy standard input
5 # to standard output. You determine what headers it generates with
8 # You can feed the output of this program to 'smtpsend' to send the mail
9 # message somewhere via SMTP.
10 #-----------------------------------------------------------------------------
14 my $TRUE=1; my $FALSE = 0;
32 if (defined($options{"subject"})) {
33 print("Subject: " . $options{"subject"} . "\n");
35 if (defined($options{"to"})) {
36 print("To: " . $options{"to"} . "\n");
38 if (defined($options{"cc"})) {
39 print("Cc: " . $options{"cc"} . "\n");
41 if (defined($options{"from"})) {
42 print("From: " . $options{"from"} . "\n");
44 if (defined($options{"date"})) {
45 print("Date: " . $options{"date"} . "\n");
47 if (defined($options{"reply_to"})) {
48 if ($options{"reply_to"} ne "") {
49 print("In-Reply-To: <" . $options{"reply_to"} . ">\n");
52 if (defined($options{"message_id"})) {
53 print("Message-ID: <" . $options{"message_id"} . ">\n");
55 if (defined($options{"charset"})) {
56 print("MIME-Version: 1.0\nContent-Type: text/plain; charset=" . $options{"charset"} . "\nContent-Transfer-Encoding: 8bit\n");