Re: [SLUG] sending a file attachment with mail from the command line

From: Mario Lombardo (mario@alienscience.com)
Date: Mon Jan 21 2002 - 21:33:09 EST


Mike, I'm sorry this is coming late, but I'm nearly a week late at
catching up to the SLUG list.

I believe the correct way to do this, as an attachment, is to do the following:

mail - s "mebs backup" someone@somewhere.com
~r /the/exact/path/of/mebsbackup.tgz
Ctrl-D

The "tilde r" in the man page(off my cuff) for "mail" states:
starting from the first column with "~r", proceeding with a space,
and then a path/filename, will attach the file upon executing a
carriage return. I hope I've helped, and I'm not too late.

Mario

>I'm trying to setup an automated database backup. I'm using mysqldump to
>dump the data to a text file and then tar the file up (it's not a large
>database) and then I would like to send it to a user on a differnet
>system. This is the command I'm using
>mail -s "mebs backup" somone@somewhere.com < mebsbackup.tgz
>
>This will send the file but not as an attachement to the email. I do get
>the contents of the file but I was hoping for a file "mebsbackup.tgz"
>that I could save on my system.
>Any ideas how to do this?
>Thanks
>Mike M
>
>--
>perl -ne'chomp;$a.=pack"h*",$_;END{print"\n$a\n\n"}'<<RM
>c496e657870225f636b6371202d49636f62737f6664702355736b637
>12a0
>RM
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:22:37 EDT