How to attach a file to the unix mailx

How to attach a file to the unix mailx

am 09.03.2006 14:33:04 von Joanne

Hi, I am trying to automate the emailing of a report created on Solaris
8. Currently I used the following:

mailx -s 'Subject' xxx@xxxxxxx.com < report.txt

The problem with the above is that the report is sent as part of the
email rather than an attachment.

I would like to know how to send the report as an attachment. Please
let me know how.

Many thanks in advance.
Joanne Hu

Re: How to attach a file to the unix mailx

am 09.03.2006 14:45:24 von Vino

Joanne wrote:
> Hi, I am trying to automate the emailing of a report created on Solaris
> 8. Currently I used the following:
>
> mailx -s 'Subject' xxx@xxxxxxx.com < report.txt
>
> The problem with the above is that the report is sent as part of the
> email rather than an attachment.
>
> I would like to know how to send the report as an attachment. Please
> let me know how.
>
> Many thanks in advance.
> Joanne Hu
>

Check this out...
http://www.unix.com/showthread.php?t=23604&p=91887
http://www.unix.com/showthread.php?t=18370&p=70254

--.

Re: How to attach a file to the unix mailx

am 09.03.2006 15:39:59 von lhf

See ftp://ftp.tecgraf.puc-rio.br/pub/lhf/matt.tar.gz

Re: How to attach a file to the unix mailx

am 09.03.2006 16:11:07 von K

Checkout mimencode. It is more robust than uuencode.

Re: How to attach a file to the unix mailx

am 09.03.2006 16:29:38 von Joanne

Hi,

Thanks a lot. What I found in
http://www.unix.com/showthread.php?t=18370&p=70254 worked for me.

I am a new member to this group. I really appreciate your help.

Many thanks again.
Joanne

Re: How to attach a file to the unix mailx

am 10.03.2006 09:27:32 von Adrian Davis

Joanne,

I use "mutt" for this sort of thing - See http://www.mutt.org

Regards,
=Adrian=

Re: How to attach a file to the unix mailx

am 10.03.2006 09:43:38 von romy

Try this one :

( cat mail_message.txt; uuencode attachment_file_name
attachment_file_name ) | mailx -s "Subject" to@address.com

where mail_message.txt contains the text you want in the body of the
mail.

Romy

Re: How to attach a file to the unix mailx

am 03.04.2006 21:52:54 von Joanne

Hi, I guess I never opened the attachment previously. I happened to
check today and noticed that the attachment is not right at all. It is
a much smaller size file containing all junks. I am wondering what is
wrong with the following:
(echo "This is an automated report that runs on the 16th of every month
at 9:00
GMT."
uuencode /usr/home/oracle/ mydatabase_info.txt
) | mailx -s 'Stats for ewdevl' myname@mycompany.com

Many thanks,
Joanne

Re: How to attach a file to the unix mailx

am 04.04.2006 00:35:13 von Bill Marcum

On 3 Apr 2006 12:52:54 -0700, Joanne
wrote:
> Hi, I guess I never opened the attachment previously. I happened to
> check today and noticed that the attachment is not right at all. It is
> a much smaller size file containing all junks. I am wondering what is
> wrong with the following:
> (echo "This is an automated report that runs on the 16th of every month
> at 9:00
> GMT."
> uuencode /usr/home/oracle/ mydatabase_info.txt

The arguments to uuencode should be filenames, not directories.
If the filename " mydatabase_info.txt" begins with a space, quote it
(and slap whoever thought of that name).

> ) | mailx -s 'Stats for ewdevl' myname@mycompany.com
>
> Many thanks,
> Joanne
>


--
There's no real need to do housework -- after four years it doesn't get
any worse.