Send a mail with attchment...?

Hi all,

how to send an E-mail with an attchment in HP-Unix...?

i am using the following command in solaris...! for HP..?

uuencode $Basic_location/out.csv $Basic_location/out.csv | mailx -s "$SUBJ" $TO_LIST

please let me know how we can use this in HP box...?

Should work... (well it used to for me some time ago...)

if you can use Perl, module MIME::Lite - low-calorie MIME generator - search.cpan.org will help you

Can you please share what error or problem you are facing.

don't forget mutt...

Old post but Im goona post anyway,....

Here is the script i use:

just call sh sctipt.sh /path/to/filename

#!/bin/bash
ATTFILE=$1
ATTNAME=$1
MAILTO=someone@somewhere.com
MAILFROM=someoneelse@somewhere.com

( cat <<HERE; uuencode "${ATTFILE}" "${ATTNAME}" ) | sendmail -oi -t
From: ${MAILFROM}
To: ${MAILTO}
Subject: Subject Here attached $ATTNAME

HERE

I use elm on HP-UX - you have to run the elm command alone first if you have never used it. And then use an attach file that tells elm where the attachment is:

elm -s "Monthly Statistics" $EMAIL < /dci_wrk/attach.statistics

The attach file looks like this:

blank line
[include stats.csv text/plain]

My stats.csv file happens to be in the same directory as the attach file - if not, I would have to provide the path.