nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Attaching graphics files

2012-09-09 00:39:09

But how do I attach a .png file, for example, b.png?
or a  .jpg file,  for example, c.jpg?

Those are all under image; image/png and image/jpeg are the MIME types you
are interested in.  If you use "attach" at the WhatNow? prompt, it already
knows what to do with those filename extensions.

Depending on the recipient, it may make sense to add an appropriate
Content-Disposition header.  You can do that with the extended
mhbuild syntax like this:

#image/jpeg <>{attachment} c.jpeg

Norm - To get from the ".png" file extension to "#image/png" for comp et al 
do...

  grep png /etc/mime.types

...assuming you have "mailcap" installed.  

Also, it may be easier to just remember...

  #image/png [b.png] b.png

There was a time when this form (generating Content-Description instead of
Content-Disposition: ... filename=) caused problems (with early Mac Mail.app
IIRC) but that's been 5, 10 years ago.

There is also a simpler way: you can just type "attach SoundShot.tgz" at
the Whatnow prompt, but you have to these mysterious settings in 
~/.mh_profile...

  send: -attach X-MH-Attach -attachformat 1
  whatnow: -attach X-MH-Attach


Ken - Do you have some specific reason for generating "Content-Disposition: 
attachment"?
I never done that and nobody's ever complained, not that that means a whole 
lot, I
suppose.

steve
--


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>