02-21-2006
Hey Priya,
Simply I see only problem to this and that is "," in your mail list. Try to remove comma from mail list and separate the email ids by space and hope you should be all set.
Other wise you could just use sendmail command with "," separated email ids.
Syntax for the sendmail.
LOGNAME=`whoami` #If mail couldnot be send, it will bounce on this account
MailList=${Mail_File_Path}/Mail_List.txt
MAILTO=`cat $ MailList `
echo "From: $LOGNAME\nTo: $MAILTO\nSubject: $SUBJECT" > $mail_body_file
echo "
$SUBJECT.
Regards,
$LOGNAME" >> $mail_body_file
echo ".\n" >> $mail_body_file
#Mail will not be sent to anyone if "." does not appear in first column of th
/usr/lib/sendmail -t -oi < $mail_body_file
Don't forget to add . at the last like I used here with echo. It is mandatory.
Here you can use To,CC,BC, subject attachement ect. Its almost identical to outlook mail so you can use all the facilities what ever you can see in your outlook on windows.
Regards,
Manish Jha
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi
A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as
" usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies
2. Solaris
Hi, Can anyone pls. tell me how to access Active directory from solaris. I am looking at solution by which I can send mail notification from the logs generated by scripts, to the users on Exchange server. I am trying for a Perl-LDAP module , but don't realy know how to go for it (5 Replies)
Discussion started by: ganeshh
5 Replies
3. Shell Programming and Scripting
hi,
i am trying to send mail with attachment to web-based email client like gmail.com using mailx. the problem is it is displayed in content rather than as attachment.
the code i am using is as follows,
uuencode test1.txt test1.txt | mailx -s "test only" aaaa@gmail.com
does anyone... (1 Reply)
Discussion started by: randomcz1
1 Replies
4. UNIX for Dummies Questions & Answers
hi,
i'm pretty new to this unix. i've been asked to create a shell script which will pick up the email id from a text file(stored in same machine, same directory) searches for that id in another file in which a product name( a one line text) is mentioned against it. then it should send a mail... (0 Replies)
Discussion started by: vishwas.shenoy
0 Replies
5. UNIX Desktop Questions & Answers
Im trying to use a shell script to send to a list of email addresses in a txt file. Here is what i have tried but it keeps sending to dead.letter...
Success.ksh contains...
mailx -s"Night Batch Success" 'cat /Scripts/email_addresses.txt' < /Scripts/email_body_message.txt
The email body... (1 Reply)
Discussion started by: aguad3
1 Replies
6. UNIX for Dummies Questions & Answers
Hey Guys,
I have been trying to send a email as ccto a email ID .However it seems the -c option is not working in HP UX system.
It is shooting an error as "mailx: illegal option -- c"
My script isin the below manner:
mailx -c EMAIL_IDS_CC# -s 'BDC reminder' -r sender@email.com... (1 Reply)
Discussion started by: rohit.shetty84
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
My requirement is I have to send email using mailx command and the recipient of the mail should see a alias instead of email address in his mail box. The same functionality that we get when we sent email using an address book. Is this functionality possible through mailx?
I tried doing... (5 Replies)
Discussion started by: vamsisurampalli
5 Replies
8. Solaris
I would like to use Mailx command, please i hope when you replay give me example. because this is very good think for me.
I am New in sun Microsystems Solaris 10, i hope to give me also rules to learn Solaris easily.
Thank you
Joseph Shafik (8 Replies)
Discussion started by: J.shafik
8 Replies
9. Shell Programming and Scripting
I am trying to send email using
"echo "Test Email" | mailx -s "Subject" someone@xyz.com
I also want to send CC to another email address along with TO using above statement.
Can anyone please help me on this.
Thanks. (2 Replies)
Discussion started by: swap27
2 Replies
10. Shell Programming and Scripting
Hello,
I am using heirloom-mailx on UBUNTU 11.04 to create a bash script that sends an e-mail with an attachment.
The command invoked is :
echo $BODY | mailx -v \
-S smtp=smtps://$smtpmailserver:465 \
-S from=$MITTENTE \
-S ssl-verify=ignore \
-S smtp-auth=login \
-S smtp-auth-user=$USER \... (8 Replies)
Discussion started by: occhiverdi1987
8 Replies