mail with attachments

I want to send a mail with three attachments, but nothing happened. I tried it with mail and mailx.

Are there special options for these commands or is it not possible to send mails under Solaris with attachments? Must there be special adjustments in the environment?

Can anyone give an example, how the command has to look to send a test.txt to user1@localhost?

uuencode 123.txt abc.txt | mailx someone@somewhere

Hi Incredible,

The uuencode command will encrypt the message txt file .

But will it send the mail thru attachment.

Throw some light on this.

According to your original email:

uuencode test.txt test.txt | mailx user1@localhost

However, this is often augmented by the following, where the message gets a subject line:

uuencode test.txt test.txt | mailx -s "Important file requested" user1@localhost

Lastly, my understanding of mailx is that it can only accomodate one attachment at a time. When I ran into this issue, I just created a loop to send my three attachments as three emails.
There are other products (Mutt?) that may be able to accomodate the sending of multiple attachments.

uuencode does not create proper MIME attachments, and mailx does not (usually) support MIME. See the FAQ mail forum for a script which sends multiple attachments.

Try using 'mut' to send attachments.

Add package for mut first. The command should be something like this:

$ mutt -s "your mail" -a /tmp/your_file.tar.gz herc@telus.com < /tmp/mymail_message.txt
Where,

herc@telus.com - is the recipient
/tmp/mymail_message.txt - is the main body of the e-mail
/tmp/your_file.tar.gz - is an attachment (with option -a)
"Your mail" - is a subject line (option -s)

Hope that helps...