[Nmh-workers] Attachments question

2007-08-30 Thread Stewart W. Wilson

Hi,

How do you do attachments with nmh?

I've googled for an hour and can't find anything that works.

Suppose I have, say, a tar file that I want to attach.  What
do I do and how do I have to be set up?

My .mh_profile is as follows (I have nmh-1.1-RC3):

--
Path: Mail
Current-folder: inbox
Draft-folder: outbox
Editor: vi
Signature: Stewart Wilson
ali: -alias /home/wilson/.mh_aliases
send: -alias /home/wilson/.mh_aliases
whom: -alias /home/wilson/.mh_aliases
unseen-sequence: unseen
--

Thanks for your help!

Stewart


___
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Attachments question

2007-08-30 Thread Jerry Peek

On 8/29/2007 2:26 PM, Stewart W. Wilson wrote:

How do you do attachments with nmh?


Hi Stewart,

Check the mhbuild(1) manpage or the online book section 
http://rand-mh.sourceforge.net/book/mh/cosemime.html (which is a bit out 
of date but may be easier to start with).


If you run into problems, write back...

Jerry


___
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Attachments question

2007-08-30 Thread David Levine
Jerry writes:

> Check the mhbuild(1) manpage or the online book section 
> http://rand-mh.sourceforge.net/book/mh/cosemime.html (which is a bit out 
> of date but may be easier to start with).

An alternative to mhbuild is to use the whatnow "attach"
command included in modern nmh.  It hides the mhbuild
commands.  See the send and whatnow man pages.

"Modern" here means since August 2002, I think, though
support for the attachformat option shown below was added in
February 2006.

To use:

0) Add "-attach X-MH-Attachment" to the send: and whatnow: lines in
   your .mh_profile.  Mine look like:

send: -forward -msgid -attach X-MH-Attachment -attachformat 1
whatnow: -attach X-MH-Attachment

   And, add some mhshow-suffix entries for the content types that you
   send, if you don't already have them.  I use these:

 The mhshow-suffix entries are necessary to get the:
 proper application type with -attach X-MH-Attachment:
mhshow-suffix-text/plain: .output
mhshow-suffix-text/plain: .txt
mhshow-suffix-text/plain: .xml
mhshow-suffix-text/html: .html
mhshow-suffix-image/jpeg: .jpg
mhshow-suffix-application/msword: .doc
mhshow-suffix-application/pdf: .pdf
mhshow-suffix-application/PostScript: .ps
mhshow-suffix-application/vnd.ms-excel: .xls
mhshow-suffix-application/vnd.ms-powerpoint: .ppt

For tar files, something like these should work:
mhshow-suffix-application/x-tar: .tar
mhshow-suffix-application/x-compressed-tar: .tgz

1) At the whatnow prompt, enter:

attach /tmp/foobar.tgz


Then send as usual.  You won't get a chance to preview the mime
output, but I've gained so much confidence with it that I no
longer feel the need to.

Some tips:

* attach allows shell wild cards.
* ls can be used at the whatnow prompt to look for your files.
* al[ist] can be used at the whatnow prompt to show what
  you've attached.  det[ach] can be used to delete
  attachments.  And if you really want, you can edit the
  message to change attachments, though I reserve that for
  reordering.
* Cc: or Dcc: yourself if you want to see what was sent.

David

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


___
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Attachments question

2007-08-30 Thread Philipp Roessler

Hi Stewart

I just used to composed messages of the form

  To: ...
  cc: ...
  From: ...
  Fcc: +outbox
  Subject: ...
  
  Bla, bla, bla ...

  #application/pdf; name="Abiturzeugnis.pdf" Abiturzeugnis.pdf
  #image/jpeg; name="Hotel_Walnut-Creek.jpg" Hotel_Walnut-Creek.jpg
  #application/rtf; name="LetterRecom.rtf" /Users/phil/LetterRecom.rtf
  ...

Best regards

Philipp


On 29 Aug 2007, at 23:26 , Stewart W. Wilson wrote:



Hi,

How do you do attachments with nmh?

I've googled for an hour and can't find anything that works.

Suppose I have, say, a tar file that I want to attach.  What
do I do and how do I have to be set up?

My .mh_profile is as follows (I have nmh-1.1-RC3):

--
Path: Mail
Current-folder: inbox
Draft-folder: outbox
Editor: vi
Signature: Stewart Wilson
ali: -alias /home/wilson/.mh_aliases
send: -alias /home/wilson/.mh_aliases
whom: -alias /home/wilson/.mh_aliases
unseen-sequence: unseen
--

Thanks for your help!

Stewart


___
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers





___
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers