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.
- create a body.txt that contains:
Attached is your file.
~c cc_addr@host.com
- create the attachment and append it to body.txt
uuencode path/filename filename >> body.txt
- send the email
mailx -s "Subject" < body.txt
jolok
3
What about using the -c flag
to mailx?
% mailx -s "Subject" -c otherguy@example.com thisguy@example.com < body.txt