Re: Unix mail

From: Bill Thompson (bill.thompson@GOODYEAR.COM)
Date: Mon Jan 27 2003 - 06:22:55 EST


Mohammed,

This has been brought up a number of times on this list. I'm sure there are
more answers in the archives but here's one method using mailx:

Binary attachments:

mailx -s "Your subject goes here" john_smith@company.com <<EOT

Dear John,

Here's the file you requested.

Me.

$(uuencode /full/path/to/file file)

EOT

Text files as attachments:

mailx -s "Your subject goes here" john_smith@company.com <<EOT

Dear John,

Here's how to add attachments:

$(uuencode textfile name.txt)

Me.

EOT

Output of commands:

mailx -s "Your subject goes here" john_smith@company.com <<EOT

Dear John,

Here's what the filesystems look like:

$(df -Pk)

Here's what they looked like yesterday:

$(cat /var/tmp/df_from_yesterday)

Me.

EOT

Bill Thompson
Sr UNIX Systems Administrator
The Goodyear Tire & Rubber Co.

Contains Confidential and/or Proprietary Information
May Not Be Copied or Disseminated Without Express Consent of The Goodyear
Tire & Rubber Company.

AIX-L Archives: http://marc.theaimsgroup.com/?l=aix-l&r=1&w=2

----- Original Message -----
From: "Mohammed Kamal" <Mohamed.Kamal@SPDC.COM.EG>
Newsgroups: bit.listserv.aix-l
To: <aix-l@Princeton.EDU>
Sent: Sunday, January 26, 2003 6:39 AM
Subject: unix mail

> I want to know if is it possible to attach a binary file when sending
mail
> from unix box
>
> Best Regards
> Mohammed Kamal
> Systems Engineer
>



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:31 EDT