Afficher un message
Vieux 20/08/2006, 14h57   #4
Matej Cepl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to type a message and also have an attachment with "mail"

yusuf wrote:
> Currently, I send the contents of a file by mail by typing:
>
> mail someone@somewhere.com < some.file
>
> But I can't type my own message using the above command to send with
> the file. I checked the command line options for mail and there doesn't
> seem to be an attachment parameter. Does anyone know how I can do this
> through the command line?


You have to either built whole MIME message (with all boundaries and
everything) and pipe it to /usr/bin/mail (or directly
to /usr/sbin/sendmail -- after all, when you built it all yourself there is
not much mail can do for you). The other way would be to use some other
mail replacement -- nail is 100% replacement of mailx and it can do (among
other things) attachments.

Matěj

--
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
http://www.ceplovi.cz/matej/blog/, Jabber: ceplma@jabber.cz
23 Marion St. #3, (617) 876-1259, ICQ 132822213

As a rule of thumb, the more qualifiers there are before the name
of a country, the more corrupt the rulers. A country called The
Socialist People's Democratic Republic of X is probably the last
place in the world you'd want to live.
-- Paul Graham discussing (not only) Nigerian spam
(http://www.paulgraham.com/spam.html)

  Réponse avec citation
 
Page generated in 0,06059 seconds with 9 queries