🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #2659

Re: how do I email an article to a third party?

#2659
From: J. Blustein
Date: Sat, 05 Dec 1992 15:38
69 lines
2670 bytes
In article <1fjj7lINNfk8@male.EBay.Sun.COM>
zombie@EBay.Sun.COM asked:
>
>In trn, how do I email an article to a third party?  The only way
>that I have been able to do this is to R (include the article),
>then enter the editor, and change the To: field.  This is kind of
>klunky.

    I defined a macro `^F' to call a script to do this.  (If you can
see improvements to the script please tell me.  I started programming
in sh recently, and I'm not sure I've got the hang of it.)

    Here's the macro definition:
	^F	%(%m=[ap]?|$TRNLIB/forward.article "%s" :^F)

    Here's the script it calls:
#! /bin/sh 

#++
# mails news article (stdin) to user specified *AND*
# puts copy of mail in outgoing mail folder.
# 
# PARAMETERS:
#    $1  The subject of the article 
#    $2- The recipients
#
# AUTHOR:   Jamie Blustein <jamie@uwo.ca>
# CREATED:  November 1992
# MODIFIED: 14 November 1992
#--

# Get default values from the command line
if [ $# -eq 0 ] ; then 
   defsub="Forwarded news article"
else
   defsub="$1"
   if [ "$2" ] ; then 
     todef="$2" 
     shift ; shift
     for i do
        todef=${todef}" "$i
     done
     showdef=\["$todef"\]
   fi
fi

# Get subject and recipients from user (using defaults)
echo -n "To: $showdef " > /dev/tty  
read < /dev/tty to

if [ -z "$to" ] ; then 
   if [ -z "$todef" ] ; then
      exit 1
   else
      to=$todef 
   fi
fi

echo -n "Subject: [$defsub] " > /dev/tty  
read < /dev/tty subject
if [ -z "$subject" ] ; then 
   subject=$defsub ; fi


cat | /usr/bin/mail -s "$subject" "$to" 

-- 
James Blustein                                        `Did you say "knives"?'
<jamie@uwo.ca>                                        `*Rotating* knives, yes.'
Technical Details
Message-ID: <1992Dec5.153824.24607@julian.uwo.ca>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!sparky!uunet!utcsri!skule.ecf!torn!newshost.uwo.ca!csd.uwo.ca!jamie
References: <1fjj7lINNfk8@male.EBay.Sun.COM>

Show Full Headers
Complete Article Headers
Message-ID: <1992Dec5.153824.24607@julian.uwo.ca>
Subject: Re: how do I email an article to a third party?
Date: Sat, 5 Dec 1992 15:38:24 GMT
From: jamie@csd.uwo.ca (J. Blustein)
References: <1fjj7lINNfk8@male.EBay.Sun.COM>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!sparky!uunet!utcsri!skule.ecf!torn!newshost.uwo.ca!csd.uwo.ca!jamie
Newsgroups: news.software.readers
Reply-To: jamie@uwo.ca (J. Blustein)
Organization: Computer Science Dept., Univ. of Western Ontario, London, Canada
Followup-To: news.software.readers
Summary: a sh script to mail articles to third-parties.
Keywords: mail sh script
Sender: news@julian.uwo.ca (USENET News System)
Nntp-Posting-Host: gleep.csd.uwo.ca
Lines: 69