Subject: Using Pine from Command Line

From: Chuck Everett <[email-masked]>
Date: Tue, 2 Sep 2003 14:05:47 -0500 (Central Daylight Time)

I'm trying to setup a script that will use pine in batch from the
command line, attach a file, and send the message without user
intervention.

The script works fine to a point.  It fires up pine, enters compose,
attaches the file but then doesn't "send" and "exit".  I have to do
the "^X" and the "y" to send and conferm.

Here is a sample of a typical script:

pine -I "^X,y"  [email-masked] -attach /u/che/roster.htm

I've tried the -I command with/without singlequotes/doublequotes,
with/without the space after the command.

The system I'm running this is the IBM AIX flavor of unix and has Pine
Version 4.33 loaded.  The help shows me both command line options as
being valid:

 -attach <file> Go directly into composer with given file
 -I <keystroke_list>   Initial keystrokes to be executed

Any help on doing this batch with no user intervention???

Chuck Everett

--------------------------------------------------------------------------
 Odessa College, Information Systems, 201 W University, Odessa TX 79764
--------------------------------------------------------------------------
           Chuck Everett                      IBM RS6000 model 6f1x4
 Title  :  Database Administrator             AIX        v4.3.3.9
 E-mail :  [email-masked]                Unidata    v6.0.0-1
 Phone  :  432-335-6664                       Envision   4.7.1.8
 FAX    :  432-335-6846                       Colleague  R17
 Web    :  www.odessa.edu                     DMI        2.2.1
 ProgLib:  www.odessa.edu/dept/is             Webadvisor 2.12
--------------------------------------------------------------------------

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Eduardo Chappa <[email-masked]>
Date: Tue, 2 Sep 2003 12:19:09 -0700 (PDT)

*** Chuck Everett ([email-masked]) wrote in the pine-info list today:

:) I'm trying to setup a script that will use pine in batch from the
:) command line, attach a file, and send the message without user
:) intervention.

Chuck,

  You can not do this without patching Pine. The problem is that Pico does
not understand the "^X,y" part of your command. I have a patch in my web
page that will send messages without having to press ^X,y. Feel free to
use it. Link below.

  You could also try using other programs, I understand that munpack and
mutt can do what you want without any need to rebuild. Maybe that's easier
for you.

Eduardo
http://www.math.washington.edu/~chappa/pine/

---

From: Claus Atzenbeck <[email-masked]>
Date: Tue, 2 Sep 2003 21:46:10 +0200 (CEST)

> command line, attach a file, and send the message without user

Pine will not work this way. I had the same problem and I ended up
using Mutt for this task. Mutt works fine.

Claus

---

From: "Arthur H. Johnson II" <[email-masked]>
Date: Tue, 2 Sep 2003 16:09:29 -0400 (EDT)

I use the Patched Pine from here:

http://www.math.washington.edu/~chappa/pine/info/all.html

You can get the patches individually as well.  One of them is the ability
to do the following:

ifconfig | pine -I "^x,y" [email-masked]

To send email unattended.  There are other command line options for pine.
The ability to attach, subject, etc are just a few and are all available.
I've never had a problem compiling the patched pine either.

-- 
Arthur H. Johnson II, [email-masked]
AIM:  bytor4232
YIM:  arthurjohnson
IRC:  [email-masked]

---

From: Birl <[email-masked]>
Date: Wed, 3 Sep 2003 14:31:14 -0400 (EDT)

As it was written on Sep 2, thus Chuck Everett spake unto Pine Discussion Forum:

Chuck:  Return-Path: <[email-masked]>
Chuck:  Sender: [email-masked]
Chuck:  Date: Tue, 2 Sep 2003 14:05:47 -0500 (Central Daylight Time)
Chuck:  From: Chuck Everett <[email-masked]>
Chuck:  To: Pine Discussion Forum <[email-masked]>
Chuck:  Subject: Using Pine from Command Line
Chuck:
Chuck:
Chuck:  I'm trying to setup a script that will use pine in batch from the
Chuck:  command line, attach a file, and send the message without user
Chuck:  intervention.
Chuck:
Chuck:  The script works fine to a point.  It fires up pine, enters compose,
Chuck:  attaches the file but then doesn't "send" and "exit".  I have to do
Chuck:  the "^X" and the "y" to send and conferm.
Chuck:
Chuck:  Here is a sample of a typical script:
Chuck:
Chuck:  pine -I "^X,y"  [email-masked] -attach /u/che/roster.htm
Chuck:
Chuck:  I've tried the -I command with/without singlequotes/doublequotes,
Chuck:  with/without the space after the command.
Chuck:
Chuck:  The system I'm running this is the IBM AIX flavor of unix and has Pine
Chuck:  Version 4.33 loaded.  The help shows me both command line options as
Chuck:  being valid:
Chuck:
Chuck:   -attach <file> Go directly into composer with given file
Chuck:   -I <keystroke_list>   Initial keystrokes to be executed
Chuck:
Chuck:  Any help on doing this batch with no user intervention???
Chuck:
Chuck:  Chuck Everett

Why not use mailx if it's just HTML?

cat /u/che/roster.htm | mailx -s "Subject" [email-masked]