Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-mail using UNIX on AIX 1

Status
Not open for further replies.

sarav1981

Programmer
Jul 14, 2005
29
0
0
US
Hi All,

I am new to UNIX. I use IBM AIX 5.3 at work. I was wondering a way to send emails accross using UNIX. I am aware of the basic syntax using mailx -s <email addresses> to send emails.

But, I would like to know if there is a way to control the recipients using TO, CC and BCC statements in the UNIX mail syntax. Also, I would like to send in multiple attachments with the email. How can I accomplish this?

It wud be great if anyone can help me out in this regards.

Thanks,
Sarav
 
You could use pine


First off read the man page as this will answer most of your questions

man mailx

You can send attachments as follows

uuencode filename filename | mailx -s "Subject" user.domain.com

If you also want Text in the mail body as well as the attachment

(cat somefile.txt ; uuencode filename filename) | mailx -s "Subject" user.domain.com

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Hi there
The BCC part was an interesting one.
Not sure if this is the best one, but here's what I've done:

Code:
echo "
~b someone@bcc.org
Hello,
Here is websm.log" > X.file && uuencode websm.log websm.log >> X.file && cat X.file | mailx -s "X.File" someone@visible.com

&quot;If you always do what you've always done, you will always be where you've always been.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top