[nmh-workers] Forwarding html email

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[nmh-workers] Forwarding html email

aalinovi
I am trying to figure out how to forward an html email.
I've gone thru the relevant portions of the online version of
Jerry Peek's book but nothing seems to work. All I see in each
case is the raw html. Tring to make an alias gives me permission
denied as does trying to make a command line version even tho
permissions seem to be correct.

Also, I don't understand how forw -mime works as all I get in
the forwarded message is the line:

#forw [forwarded message] +/home/aalinovi/Mail/inbox 1

but no message.

I know I'm probably making some simple beginner errors but I'm stumped
as to what I'm doing wrong.

Any help would be appreciated.

--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
Reply | Threaded
Open this post in threaded view
|

Re: Forwarding html email

Conrad Hughes
> #forw [forwarded message] +/home/aalinovi/Mail/inbox 1

When you get back to the What now? prompt, just type

  mime

.. that'll include the message.

C.

--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
Reply | Threaded
Open this post in threaded view
|

Re: Forwarding html email

aalinovi
>> #forw [forwarded message] +/home/aalinovi/Mail/inbox 1
>
>When you get back to the What now? prompt, just type
>
>  mime
>
>.. that'll include the message.

Good grief, it's that simple? And here I am messing with aliases,
command versions and symbolic links. I feel like such a fool.
Thank you.

--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
Reply | Threaded
Open this post in threaded view
|

Re: Forwarding html email

Ken Hornstein-2
In reply to this post by aalinovi
>I am trying to figure out how to forward an html email.

Conrad gave you the correct answer, but let me expand on that a bit.
(also, "dist" would have worked fine; if you've never used that
interface before it sends the message along but it puts your information
in "Resent" headers, like "Resent-From", "Resent-To", etc etc.  If the
recipient doesn't know to look for that they would think the message was
from the ORIGINAL sender and not you and that confuses people).

>Also, I don't understand how forw -mime works as all I get in
>the forwarded message is the line:
>
>#forw [forwarded message] +/home/aalinovi/Mail/inbox 1

So, the REAL problem here is nmh (and MH) was written back when MIME
was barely a thing and MIME messages were the exception and not the norm.
What forw -mime does is generate a directive for mhbuild, which is the
tool which converts drafts into compliant MIME messages.  When mhbuild
processes the draft it will then make sure the resulting message will
have proper MIME encapsulation.  It's kind of hard to do that automatically;
I've thought about ways to do that but I haven't come up with a good scheme
yet given the current way nmh is structured.

But ... I have some questions for you.  We tried to document this
behavior in the forw(1) man page.  Here's the resulting snippet from it:

       To  use  the  MIME  rules  for encapsulation, specify the -mime switch.
       This directs forw to generate an mhbuild composition file.   Note  that
       nmh  will  not invoke mhbuild automatically; you must specifically give
       the command

            What now? mime

       prior to sending the draft.

My questions are: did you look at the forw(1) man page?  If so, did you
see this section?  If you did see this section, was it unclear?  If it
was unclear, could you tell us how it was unclear?  I don't mean this
to be crapping on you; I genuinely want to know how we could make our
documentation better.

--Ken

--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
Reply | Threaded
Open this post in threaded view
|

Re: Forwarding html email

aalinovi
>>I am trying to figure out how to forward an html email.
>
>Conrad gave you the correct answer, but let me expand on that a bit.
>
>But ... I have some questions for you.  We tried to document this
>behavior in the forw(1) man page.  Here's the resulting snippet from it:
>
>       To  use  the  MIME  rules  for encapsulation, specify the -mime switch.
>       This directs forw to generate an mhbuild composition file.   Note  that
>       nmh  will  not invoke mhbuild automatically; you must specifically give
>       the command
>
>            What now? mime
>
>       prior to sending the draft.
>
>My questions are: did you look at the forw(1) man page?  If so, did you
>see this section?  If you did see this section, was it unclear?  If it
>was unclear, could you tell us how it was unclear?  I don't mean this
>to be crapping on you; I genuinely want to know how we could make our
>documentation better.
>
Yes, I did look at the forw(1) man page, tho obviously not as carefully
as I should have. And yes, I do recall seeing that section. The error I
was making was in not using the -mime switch. As a result, in the email
I was trying to forward:

aalinovi:~$ show 1
aalinovi:~$ forw
What now? mime
mhbuild: unknown directive "#e2e2e2"
What now?

Another thing that confused me was that when I used forw I was seeing
the raw html. I guess I was thinking I should see the text as I do when
I use repl.

Thinking about it, I suppose one mistake I made was turning to Jerry
Peek's book first and then to the man pages. Don't misunderstand me - I
think the book is good and has helped me a lot but I'll admit to getting
frustrated and confused trying to follow his instructions where nothing
I did seemed to work and I couldn't figure out why.

As a result i probably wasn't in the best frame of mind when I finally
did turn to the man page and skimmed rather paying attention to what I
was reading.

I don't believe the documentation is unclear. The fault is mine for, as
I said above, not reading as carefully as I should have.

Arthur

--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
Reply | Threaded
Open this post in threaded view
|

Re: Forwarding html email

Robert Elz
In reply to this post by Ken Hornstein-2
    Date:        Wed, 07 Aug 2019 12:37:52 -0400
    From:        Ken Hornstein <[hidden email]>
    Message-ID:  <[hidden email]>

  | So, the REAL problem here is nmh (and MH) was written back when MIME
  | was barely a thing and MIME messages were the exception and not the norm.

MH was written back before the conceivable need for anything like MIME
was anything more than a futuristic dream (what exactly does one do with
a MIME message when one is using an ASR33, a DEcwriter 300, or even
an ADM-3a ?)

There were methods to allow files to be forwarded (uuencode, etc - but
even those way post date MH) when that was all that was needed, and for
their purpose, those worked just fine - not all that flexible, but adequate.

I think MH predated XEROX bit mapped displays (certainly before they were
copied by others (smalltalk and MH were probably roughly contemporaries),
and also predates the use of TVs as output devices for home class systems
(there were no have at home type personal computers of any kind when MH
first appeared.)   It won't be all that long until MH is 50 (it is already
in its 40's.)

What you say may be correct for nmh .. I don't remember just when that was
done (I kept using MH long after nmh existed) - but nmh initially was mostly
just a more modern implementation (code style, etc) of MH.

kre


--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
Reply | Threaded
Open this post in threaded view
|

Re: Forwarding html email

Ken Hornstein-2
>MH was written back before the conceivable need for anything like MIME
>was anything more than a futuristic dream (what exactly does one do with
>a MIME message when one is using an ASR33, a DEcwriter 300, or even
>an ADM-3a ?)

I guess the same thing they do when they're running it from an xterm?
Convert it as best you can to the local character set and display the
closest thing to "plain text" you can get.

When I said "written", I wasn't thinking of the first version of MH.  I
was more talking about the time when MIME support was added; instead
of making MIME support integrated into all of the tools they wrote a
NEW tool to handle MIME messages and kind of nibbled around the edges
at putting that new tool in a few places to make MIME messages sort-of
work.  I can't even blame that solution, since doing it "right" would
have been a lot of work and the view at the time was that MIME messages
were uncommon.  Of course that's flipped and now MIME messages are the
norm.

--Ken

--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
Reply | Threaded
Open this post in threaded view
|

Re: Forwarding html email

Ken Hornstein-2
In reply to this post by aalinovi
Thank you for your reply!

>Yes, I did look at the forw(1) man page, tho obviously not as carefully
>as I should have.

Well, it is good to understand where things went wrong; I appreciate
your explanation.  I'm sure we could have done better, but I'm not sure
exactly what to do in this case; I will have to think about it.

>And yes, I do recall seeing that section. The error I
>was making was in not using the -mime switch. As a result, in the email
>I was trying to forward:

>aalinovi:~$ show 1
>aalinovi:~$ forw
>What now? mime
>mhbuild: unknown directive "#e2e2e2"

So, this shows an example of the challenges we face.

Normally we run mhbuild (the program that runs at the "mime" command)
all of the time to ensure that the outgoing message has proper MIME
forwarding.  But directives to mhbuild to generate MIME content start
with a '#', so when mhbuild is run automatically it does NOT process
directives.  When you run it at the MIME promot it DOES process directives,
but the user has to know to escape any lines that start with a '#' with
an extra '#', otherwise you get errors like this.  And if you HAD manage
to run it successfully, you would have ended up sending out a text/plain
content with raw HTML in it, which is almost certainly what you didn't
want.  So given the current architecture, we are a bit stuck in presenting
an "obvious" user interface.

>Another thing that confused me was that when I used forw I was seeing
>the raw html. I guess I was thinking I should see the text as I do when
>I use repl.

Right, that would have just been a plaintext version of the HTML and
not the HTML itself, which would have been BETTER, but probably also was
not what you wanted.

>Thinking about it, I suppose one mistake I made was turning to Jerry
>Peek's book first and then to the man pages. Don't misunderstand me - I
>think the book is good and has helped me a lot but I'll admit to getting
>frustrated and confused trying to follow his instructions where nothing
>I did seemed to work and I couldn't figure out why.

Sigh.  I think Jerry's book has a lot of good information in it, but
it was last updated when nmh FIRST came out, many years ago.  nmh has
changed a lot since then (not as quickly as I would like, but we're doing
our best), but his book hasn't kept up.  So while a fair amount of that
book still works, some of it does not or we have better ways of doing
things in there.  Jerry used to be on this mailing list but I haven't
seen him send anything in years, and I suspect he wouldn't mind updates
to his book but THAT is also a huge job that no one has been willing
to tackle.  So many projects, so little time.

--Ken

--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers