lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev Lynx & email (was Re: MAILTO internal page proposal - form with


From: Michael Warner
Subject: lynx-dev Lynx & email (was Re: MAILTO internal page proposal - form with textarea)
Date: Sat, 13 Feb 1999 16:24:00 -0800

On or about 13 Feb, 1999, Kim DeVaughn <address@hidden> wrote:

        [...]

> Another is to automatically invoke the users mailer, when a mailto:
> link is activated.
> 
> I currently do the latter, via an EXTERNAL: statement in my lynx.cfg
> file:
> 
>   EXTERNAL:mailto:mutt -s "" %s:TRUE
> 
> the only disadvantages being that 1) I need to consciously recognize/
> notice that I am on a mailto: link, and need to hit the "." command,
> and 2) the "mailto:"; string itself is passed along as part of the
> address string (which I could automatically prune off using a wrapper
> script that would then invoke mutt, but I've been lazy, and have not
> written it yet :-) ).

        [...]

#!/bin/sh
#lxmail.sh called by lynx external for mailto:'s receives
#'mailto:address@hidden' as it's argument, chops off the
#'mailto:', and passes the address to an email program.
ADD=`echo $1 | cut -f2 -d:`
mutt ${ADD}

When I want to include the page, either to mail it to
someone or complain about bad html, or whatever, I use a
PRINTER definition.  I have to stick the address in myself,
but lynx can either prompt you for the address, or you can
hard-wire in your own (or whoever's) if you mail a lot of
stuff to yourself.  Actually, you can stick in whatever you
like at the prompt, but lynx will always be asking for a
filename, so you have to remember what it is you're *really*
specifying, which goes in as the second "%s".

PRINTER:incl in body, prompt for add:mutt -i %s %s:TRUE
PRINTER:mime attach, prompt for add:mutt -a %s %s:TRUE
PRINTER:incl,subj prompt,dummy add:mutt -i %s -s %s address@hidden:TRUE
PRINTER:mime, subj prompt, dummy add:mutt -a %s -s %s address@hidden:TRUE

and etc.

I rarely use this and didn't pay much attention to the
environmental variable access that was recently made
available, but there might be something in that area that
would be useful, too.

Also on the topic of lynx/mailer interaction, someone on (I
think) the mutt list gave these scripts for html'ifying an
email message and passing it to lynx.  It's a little slow,
but it works well for me on the email newsletters that I get
that have beaucoup cryptic URL's that show up with urlview
as just the URL and no identifying context.

The first is a shell script that just strips the headers and
passes the result to a perl script that does the heavier
lifting.

#!/usr/local/bin/tcsh
# Note: "lx" is my alias for lynx with some command-line
# flags.
formail -I "" $1 | txt2html.pl --mail > /tmp/mutt-tmp.html
lx /tmp/mutt-tmp.html
rm /tmp/mutt-tmp.html

The txt2html.pl script (~40K) is at:

<http://www.thehouse.org/txt2html/>

Seth Golub gets the credit for the perl script, I believe.

-- 
Michael Warner          "You're cute when you're stupid"
<address@hidden>                          -- R.A. Miller

reply via email to

[Prev in Thread] Current Thread [Next in Thread]