Re: Using mutt in command line ..

2001-12-27 Thread David T-G

Ivan --

...and then Ivan Castillo Escobar said...
% 
% Hi!

Hello!


% 
% Somebody can tell me how to write the exact command to send a mail with
% an attachment using the command line (mutt), without the need to enter
% the vi editor to write the message body???. I need to use a mutt command
% to be executed in a UNIX shell ...

No biggie.  Something like

  echo this is the body (it could be empty) | \
mutt -a /path/to/file/to/attach -s optional subject [EMAIL PROTECTED]

will do you just fine.  If you don't specify a subject and haven't turned
off $abort_nosubject you'll be asked for one, just like the null message
body issue (note that empty or  is not the same as null).


% 
% Please help me with this problem 

Actually, the Fine Manual contains all of the information you need, but
the bit about stdin is not necessarily intuitive, so here ya go.


% 
% Thanks,

HTH  HAND  Happy Holidays to all


% 
%   
% Ivan Castillo Escobar
% Sistemas y Redes
% DIMA LTDA.
% Tel: 591-3-3525200 Ext:333
% Fax:591-3-3525220
%   


:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg21934/pgp0.pgp
Description: PGP signature


Re: Using mutt in command line ..

2001-12-27 Thread Joel Hammer

Read man mutt.
echo My message | mutt -s ImportantLetter -a Attachment [EMAIL PROTECTED]
You can cat a file to mutt as well.
Joel
On Thu, Dec 27, 2001 at 09:32:05AM -0400, Ivan Castillo Escobar wrote:
 Hi!
 
 Somebody can tell me how to write the exact command to send a mail with
 an attachment using the command line (mutt), without the need to enter
 the vi editor to write the message body???. I need to use a mutt command
 to be executed in a UNIX shell ...
 



Re: Using mutt in command line ..

2001-12-27 Thread René Clerc

* Ivan Castillo Escobar [EMAIL PROTECTED] [27-12-2001 14:35]:

| Somebody can tell me how to write the exact command to send a mail with
| an attachment using the command line (mutt), without the need to enter
| the vi editor to write the message body???. I need to use a mutt command
| to be executed in a UNIX shell ...

mutt -s Subject -a /path/to/attachment recipient  /dev/null

Or, if you do want to supply a body in your shell script:

mutt -s Subject -a /path/to/attachment recipient  EOF

A line in the message
Another line.
Some more lines

Bla.
This is the last line
EOF

HTH,

-- 
René Clerc  - ([EMAIL PROTECTED])

We are not retreating - we are advancing in another direction.
-General Douglas MacArthur 



msg21936/pgp0.pgp
Description: PGP signature


Re: Using mutt in command line ..

2001-12-27 Thread Philip Mak

On Thu, 27 Dec 2001, Ivan Castillo Escobar wrote:

 Somebody can tell me how to write the exact command to send a mail with
 an attachment using the command line (mutt), without the need to enter
 the vi editor to write the message body???. I need to use a mutt command
 to be executed in a UNIX shell ...

If you just want to send a text file to someone, you can simply use the
standard UNIX mail command:

mail -sMy .muttrc file [EMAIL PROTECTED]  ~/.muttrc

would send e-mail to [EMAIL PROTECTED] with subject My .muttrc file and
send your ~/.muttrc file.

It doesn't work with binary files, though. You can probably use mutt to do
that somehow but I don't know how.