Sending a mail from unix script doubt


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Sending a mail from unix script doubt
# 1  
Old 02-09-2009
Sending a mail from unix script doubt

HI

i usually send an a file attachment in a mail from unix like following.

mailx -s 'Job Success' someoner@gmail.com < attachment.log

But I have observed in several threads that we can also use uuencode and uudecode.

What are they? when should we use uudecode and uuencode

please explainin with an example..

thanks in advance
rajesh
# 2  
Old 02-09-2009
With following command, it only redirect the attachment.log content into mail body, whereas with uuencode, it can encode any type of files such as programs, video, images or etc... in textual message to go with email....

mailx -s 'Job Success' someoner@gmail.com < attachment.log

To encode file and output to mailx command
uuencode infile outfile | mailx -s 'Job Success' someoner@gmail.com

For more info, google how email work.... Thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sending e-mail from unix

Hello, I want to send an email from unix. I tried following commands: mailx -s "hello" manish.xxx@xxx.com < echo_manish and echo "Testing Mail" | mailx -s "hello" manish.xxx@xxx.com but in both the commands nothing is happening. I mean it is neither giving any error nor I am receiving... (7 Replies)
Discussion started by: manishdivs
7 Replies

2. UNIX for Dummies Questions & Answers

Issue on sending a mail with attachment using unix script ?

Issue on sending a mail with attachment using unix script ? Below is my code and is working fine and there is a issue in the attachment, the attachment file printing as a text-encripted message in the mail draft box instead of putting as a attachment (cat $msg; uuencode $attach1 in1.txt ;... (2 Replies)
Discussion started by: gksenthilkumar
2 Replies

3. Shell Programming and Scripting

Sending mail in unix

Dear Friends, I have a shell script where the mail is being sent like this: /usr/lib/sendmail -v ${CPA_ADMIN} CPA_ADMIN="xx@abc.com" Can we specify more than one email ids in this variable? Is ther eany limit to the number of email ids I can specify in this variable, to whom the mail... (3 Replies)
Discussion started by: Radhe
3 Replies

4. UNIX for Dummies Questions & Answers

sending mail from unix

Hi, I am using mailx command to send mail through Unix. But I am able to send mail only within my domain. If i want to send mail to some other server, it's not working. Like say If I want to send mail to someone on gmail or yahoo it's not working. but it's working fine within my company domain.... (3 Replies)
Discussion started by: anki_1
3 Replies

5. UNIX for Dummies Questions & Answers

Unix:mail sending issue..pls help me soon

Hi people Can u help me aorund on this cat $DISTRIBUTION_LIST | tail -1 | read mailtolist test -s $INOVOICES.dat if then echo " Sales Report generted" | read subject mailx -ms "${subject}." $mailtolist RET_CODE=$? if ; then echo "Messaging Failed." >> $LOG_FILE exit 1 fi else... (2 Replies)
Discussion started by: bobprabhu
2 Replies

6. Programming

Sending mail in C/C++ in unix server

Hi Frnds, I have a task in my project wherein i have to send out a mail from my C++ code.With some file attachements.Please help me in this. At a higher level wat i can tell is my code generated 3 csv file and i have to send these files as attachement. My code is executed in unix... (6 Replies)
Discussion started by: electroon
6 Replies

7. UNIX for Dummies Questions & Answers

sending mail from unix is failing

i am sending mails from my unix server to my mail id i used sendmail option previously it ran successfully now it is not sending mails what might be the problem this is the message i am getting in /var/mail/abcdev file how to rectify this? ----- The following addresses had permanent... (1 Reply)
Discussion started by: trichyselva
1 Replies

8. UNIX for Dummies Questions & Answers

Sending mail thu unix

Hello everybody. Is it possible in unix to send a mail to my acount like (abcd@xyz.com) if yes then how ?? Thank You !! (6 Replies)
Discussion started by: hellotosatish
6 Replies

9. Shell Programming and Scripting

Sending Mail Thru Unix Script

What are all the things that should be configured in order to send a mail from Unix box. An eg. program of sending a mail will help me a lot!!!!!! Thanks in advance -Om (5 Replies)
Discussion started by: Omkumar
5 Replies

10. Shell Programming and Scripting

Doubt in sending mail

Hi Friends, The command used is : mail <username> < kk kk is a file containing: 02:12:00.897892 Loading the following CompanyName1: 02:12:00.898109 Loading the following CompanyName2: 02:12:00.898261 Loading the following CompanyErrorContact1: 02:12:00.898452 Loading the... (1 Reply)
Discussion started by: vijaysabari
1 Replies
Login or Register to Ask a Question