Shell script for sending automatic email to personal mail id


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script for sending automatic email to personal mail id
# 1  
Old 01-18-2010
Data Shell script for sending automatic email to personal mail id

hi guys,

I need a shell script to send mail automatically to my personal mail id like xxxx@hotmail.com but while experimenting with "mail" command I faced following problems.

Code:
 cat text1.txt | mail -s 'test mail' xxxx@hotmail.com
 command successfully executed

but while
checking for the status with mailq -Ac it poped up something like this
Code:
o0I9JG55016211       95 Mon Jan 18 14:49 tms6
                 (host map: lookup (hotmail.com): deferred)
                                         xxxx@hotmail.com

anybody knows anything about that

plz help !!!!!!!!!!!!!!!!

Last edited by pludi; 01-18-2010 at 09:24 AM.. Reason: corrected formatting, removed plain email
# 2  
Old 01-18-2010
Try this

Code:
mailx -s "test mail" xxxx@hotmail.com < text1.txt


Last edited by zaxxon; 01-18-2010 at 09:13 AM.. Reason: use code tags please, ty
# 3  
Old 01-18-2010
That has nothing to do with how the mail text will be handed over to mail. Seems your mail transfer agent (MTA) is not set up properly (postfix? sendmail? ...?). Make sure you can send mails outside - the command for sending mail seems to have no errors in it.
# 4  
Old 01-19-2010
Data How to check MTA mail transfer agent works properly

Plz help how to check/configure MTA..........
# 5  
Old 01-19-2010
Lookup sendmail or postfix configuration in google.

Most linux have sendmail installed by default. I believe you will need a domain in order for it to send out properly or a server to relay for you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sending email in shell script

Can anyone help me out how to send the email without the word success while sending to the recipient. echo "success" | mailx -s "webshell instance has been started noiw" implementation@tkcl.com (8 Replies)
Discussion started by: ramkumar15
8 Replies

2. Shell Programming and Scripting

Mailx sending attachments to personal email, but not SharePoint?

Hello! I am writing a KornShell script that (in addition to other things) sends a file from a Unix directory to a SharePoint directory. However when executing the script there is no sign of the file on the SharePoint. I have tested the script using my personal email as the destination and the... (3 Replies)
Discussion started by: mattkoz
3 Replies

3. Shell Programming and Scripting

Sending Mail via shell script

I am in need of a script that will send out emails while going through a NAT. What I have that works is as follows: display_remote_IP | sort | uniq | while read i do FOUND=0 for IP in `echo $ACCEPTABLEIP` do if ; then FOUND=1... (2 Replies)
Discussion started by: ldapguy
2 Replies

4. Shell Programming and Scripting

Sending mail from shell script

Hello All, I m trying to send mail from my unix script, I have used the below command mailx -s 'hi' email address < temp.txt It is not giving me any error,but I couldn't receive the mail Can you please help me. Many Thanks, Pragyan (6 Replies)
Discussion started by: prarat
6 Replies

5. Shell Programming and Scripting

shell script not sending mail

Hi, I have shell script which checks the filesystem check but does not send the mail. I might be missing something very simple.. could you please help? #!/bin/sh _servers="machine name" _out="/tmp/output.$$" _email="me@there.com" _sub="Disk Space Report $(date)" _mail=/usr/bin/mail... (5 Replies)
Discussion started by: Pandee
5 Replies

6. Shell Programming and Scripting

Sending email from shell script

Hi, I need to send email from a shell script. i echoed some information to a file and i am doing cat command in the email syntax thanks (2 Replies)
Discussion started by: rocky1954
2 Replies

7. Red Hat

automatic mail sending

Hi all, I want to send an e-mail automatically from linux machine to any other domain like wise gmail.com or yahoo.co.in. We have MSexchange server as a mail server. How to send e-mail from command line to other mail-IDs via exchange server. Please help.. Thanks advance... (1 Reply)
Discussion started by: ashokkumar.p
1 Replies

8. Shell Programming and Scripting

sending a mail using shell script

Please help me in writing the script for sending an attachment through email.(For example my text file name is :abc.txt and it is in directory d:/abc) (1 Reply)
Discussion started by: anitha126
1 Replies

9. UNIX for Dummies Questions & Answers

Email sending through a shell script

Hi everyone, I have a shell script that I use to send some emails with attachments. Based on the attachment file that is being sent, I choose the recipient. My file_list.txt looks like this CAJ.txt;sm@email.com KXLD.txt;jc@email.com I do a grep on this file to look for the file name and... (3 Replies)
Discussion started by: memonks
3 Replies

10. Shell Programming and Scripting

Sending attachments using email through shell script

Hi all, I have written a shell script which sends emails with attachments to our clients. All our attachments are simple flat files (.txt format). The script is working fine and sending the attachments to the mail-ids except that, when i am sending the attachments to non-outlook users (Like... (6 Replies)
Discussion started by: symhonian
6 Replies
Login or Register to Ask a Question

Featured Tech Videos