Re: send multiple email attachments

From: Dave.Zarnoch@SUNGARD.COM
Date: Thu Jun 19 2003 - 12:14:56 EDT


Bill,

VERY NICE!

Sends a very "pretty" formatted email

The "suits" are gonna love it!

:0)

Dave Zarnoch
SunGard Resources Group
SunGard eSourcing
Voorhees, NJ
Dave.Zarnoch@sungard.com

                      bill.thompson@goo
                      dyear.com To: AIX-L@pucc.Princeton.EDU
                                               cc: Dave.Zarnoch@SUNGARD.COM
                      06/19/2003 11:57 Subject: Re: send multiple email attachments
                      AM

Dave,

My preferred way is to use sendmail directly. Here's an example:

- - - - - snip - - - - -
#!/bin/sh

sendmail -t <<EOF
To: recipient1 recipient2
From: UNIX
Subject: Your subject goes here

Here is an example of a couple of binary attachment:

$(uuencode /usr/lib/sendmail sendmail)
$(uuencode /usr/bin/cp cp)

Here's some text attachments:

$(uuencode /etc/hosts hosts.txt)
$(uuencode /etc/passwd passwd.txt)
$(uuencode /etc/group group.txt)

And what the heck, lets include the output of a command or two:

Here's the output of du -sk:
$(du -sk)

Here's the output of netstat -n:
$(netstat -n)

EOF
- - - - - snip - - - - -

Give the above code a try. Just replace "recipient1 recipient2" with your
email address.

Note: Since the above is a shell script the actual file names could be
replace with variables.

Here's another benefit of using sendmail directly (since you said you're
sending to Lotus Notes). Some of our Lotus Notes group names contain
spaces. I've not found any way to send to these accounts other than using
sendmail with the -t option. For example, say you have a Lotus Notes group
called "AIX Discussion List". You could send an email to that group as
follows:

sendmail -t <<EOF
To: "AIX Discussion List"
From: Whoever
Subject: blah blah blah

body of email goes here

EOF

HTH,

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: <Dave.Zarnoch@SUNGARD.COM>
Newsgroups: bit.listserv.aix-l
To: <aix-l@Princeton.EDU>
Sent: Thursday, June 19, 2003 10:22 AM
Subject: send multiple email attachments

> Folks,
>
> Not an AIX specific question, but.....
>
> I would like to send multiple email attachments via a bourne shell script
> to Lotus notes recipients
>
> So far I have:
>
> uuencode file.txt file.txt | mail whoever@wherever
>
> This will successfully send the attachment and an icon will be included
>
> How would I send multiple attachments?
>
> I tried to uuencode to different files then send those files but they
> appear as the "raw" data instead of the nice looking icon
>
>
> Any help?
>
> Thanks!
>
> Dave Zarnoch
> SunGard Resources Group
> SunGard eSourcing
> Voorhees, NJ
> Dave.Zarnoch@sungard.com



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