![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing global variable to a function which is called by another function | sars | Shell Programming and Scripting | 4 | 06-30-2008 08:39 AM |
| Function within function (Recurance) | chassis | UNIX for Dummies Questions & Answers | 2 | 09-19-2006 06:32 AM |
| sendmail | kara | UNIX for Dummies Questions & Answers | 1 | 03-15-2002 03:28 PM |
| Sendmail | htsubamoto | UNIX for Dummies Questions & Answers | 1 | 02-05-2002 02:01 PM |
| How to convert the "select" function into a "poll" function | rbolante | High Level Programming | 1 | 07-10-2001 07:49 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
sendmail function
Hi all,
Following is the code for sending mail with attachment #! /bin/ksh SUBJ="Send mail from Unix PHDCAP12 " TO=tmp@rediff.com CC=tmp1@rediff.com ( cat << ! To : ${TO} Subject : ${SUBJ} Cc : ${CC} ! cat << ! HOPE THIS WORKS Test123 This sample E-mail message with the Unix sendmail utility. ! #uuencode ${1} ${1} ! ) | /usr/lib/sendmail -v ${TO} ${CC} ==== here even after changing the to and cc adresses the mail is still going to the same address mentioned for the first time.Can nyone help |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
I normally create the Header ( From, To, Cc, Sub) and then use sendmail -t option to send it.. then I do not need to specify the recepients to sendmail.. sendmail reads the message for recepients and sends it across..
Code:
(
cat << !
FROM : $FROM
To : $TO
Subject : ${SUB}
Cc : ${CC}
!
cat << !
HOPE THIS WORKS Test123
This sample E-mail message with the Unix sendmail utility.
!
#uuencode ${1} ${1}
!
) | /usr/lib/sendmail -vt
|
|||
| Google The UNIX and Linux Forums |