Koozali.org: home of the SME Server

[FIXED] How to attach file(s) to mails in console ?

Offline cool34000

  • *
  • 339
  • +0/-0
[FIXED] How to attach file(s) to mails in console ?
« on: December 17, 2006, 12:36:36 AM »
Hi !

I'm looking for a simple way to send a mail with an attached file via the console...

I have to send a mail with text and files attached to it... So here were I'm stuck :
Code: [Select]
cat myfile.txt | mail admin -s "your subject"This is working but can't find a switch to attach my files !!!

I typed 'man mail' but it seems that this function is unavailable :(

Is there another command-line tool to send mail as easy as 'mail' ?


Thanks in advance !

Offline mmccarn

  • *
  • 2,656
  • +10/-0
[FIXED] How to attach file(s) to mails in console ?
« Reply #1 on: December 17, 2006, 06:10:43 AM »
mail doesn't allow you to create MIME attachments.

mutt should let you do what you want and seems to be installed on my SME 7 servers.  For information, see http://www.mutt.org/doc/manual/manual-6.html#ss6.1

Offline cool34000

  • *
  • 339
  • +0/-0
[FIXED] How to attach file(s) to mails in console ?
« Reply #2 on: December 17, 2006, 11:05:17 AM »
Many thanks mmcarn, this is working as I expected !!!