Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread 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.
Sponsored Links
  #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
  #3 (permalink)  
Old 05-16-2005
Registered User
 

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
Sponsored Links
Closed Thread

Bookmarks

Tags
mailx, mailx attachment

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


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 05:48 PM
sending email from KSH unix script. rosh0623 Shell Programming and Scripting 3 07-26-2005 04:36 AM
sending email vasikaran UNIX for Dummies Questions & Answers 1 07-05-2005 06:50 AM
unix - c program sending error from DB to email chino_52284 Shell Programming and Scripting 2 04-28-2005 09:12 PM
Sending email bcheaib UNIX for Dummies Questions & Answers 7 02-22-2005 09:03 AM



All times are GMT -4. The time now is 10:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0