The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help request for sending email from unix to internet sbabuts BSD 1 09-14-2005 01:48 PM
sending email from KSH unix script. rosh0623 Shell Programming and Scripting 3 07-26-2005 12:36 AM
sending email vasikaran UNIX for Dummies Questions & Answers 1 07-05-2005 02:50 AM
unix - c program sending error from DB to email chino_52284 Shell Programming and Scripting 2 04-28-2005 05:12 PM
Sending email bcheaib UNIX for Dummies Questions & Answers 7 02-22-2005 05:03 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-14-2005
Registered User
 

Join Date: May 2005
Posts: 40
sending email in unix. need help!

how can I send an email in UNIX, attach a file and cc a receipient?

i use the command below to attach a file (this works):
uuencode path/filename filename | mailx -s "subject" addr@host.com

here is how i cc a receipient (this also works):

i have a file named cc.lis and contains:

Hello
~c rec_addr@host.com

I then execute:
mailx -s "Subject" addr@host.com < cc.lis

im having an error when i try to do this:

uuencode path/filename filename | mailx -s "subject" addr@host.com < cc.lis

is there another way to attach a file and copy (cc) a receipient then send the email in UNIX???

please help.

thanks in advance.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-14-2005
Registered User
 

Join Date: May 2005
Posts: 40
Quote:
Originally Posted by tads98
how can I send an email in UNIX, attach a file and cc a receipient?

i use the command below to attach a file (this works):
uuencode path/filename filename | mailx -s "subject" addr@host.com

here is how i cc a receipient (this also works):

i have a file named cc.lis and contains:

Hello
~c rec_addr@host.com

I then execute:
mailx -s "Subject" addr@host.com < cc.lis

im having an error when i try to do this:

uuencode path/filename filename | mailx -s "subject" addr@host.com < cc.lis

is there another way to attach a file and copy (cc) a receipient then send the email in UNIX???

please help.

thanks in advance.
i've tried the command suggested in the FAQ and it does not work for me. here's my resolution to my own problem.


1. create a body.txt that contains:

Attached is your file.
~c cc_addr@host.com

2. create the attachment and append it to body.txt
uuencode path/filename filename >> body.txt

3. send the email
mailx -s "Subject" < body.txt
Reply With Quote
  #3 (permalink)  
Old 05-16-2005
Member
 

Join Date: Mar 2005
Posts: 64
What about using the -c flag to mailx?

% mailx -s "Subject" -c otherguy@example.com thisguy@example.com < body.txt
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mailx, mailx attachment

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0