A-Z

SEND MAIL WILL ATTACHMENTS: You will need to install the following

sudo apt-get install mailx sudo apt-get install mpack

This will put the content of the attachment into the body mailx -s "Subject" fred@home.com < attached-file.txt

This will attach a file called "attached-file.txt" mpack -s 'Hello - This a test file' attached-file.txt fred@home.com

This will send an attachment called "attached-file.txt" and use the contents of a file called "message-body" as the body of the message

mpack -s 'Hello' -d message-body attached-file.txt fred@home.com

This is the complete exercise

sudo apt-get install mailx mpack echo "The is your file attachment" > ~/attached-file.txt echo "Attached you will find your weekly report" > ~/message-body mpack -s 'Weekly report' -d message-body attached-file.txt fred@home.com

A-Z (last edited 2010-01-11 20:22:15 by cpc3-rdng22-2-0-cust593)