Send Email from command line in Ubuntu 11.10


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers Send Email from command line in Ubuntu 11.10
# 1  
Old 02-01-2012
Send Email from command line in Ubuntu 11.10

Have problem to send email from command line according to the posts like this one:
Code:
To have the ability to send email from the command line, you will need  to install the mailutils and postfix packages with the following  commands.
apt-get install mailutils
apt-get install postfix

Now configure postfix by running the following command.
dpkg-reconfigure postfix

Your machine should now have the ability to send email from the command line. Test it.
echo "test" | mail yifang.tom@hotmail.com

Did not touch the postfix configuration part though, left it unchanged. But I never get it work. No error no mail in my hotmail.com. I must have missed something about the configuration. What I want to do is to send email to friends, and even my own hotmail account, from the command line when I am in the campus, office and home (I have wireless internet access at these three places where I do my stuff mostly.) I am using Ubuntu 11.10 on Compaq CQ630 laptop. My ISP is SHAW.COM and I do not have a domain at this moment.
Thanks a lot! YF
# 2  
Old 02-24-2012
if you still try to send mail here is another explanation sounds better because of configuration provider and so on:
email - How to send mail from the command line? - Ask Ubuntu - Stack Exchange
This User Gave Thanks to daWonderer For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Another one line command where I'd like to determine if Ubuntu or Red Hat when running command

Hello Forum, I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies

2. Shell Programming and Scripting

Need command to capture word from shell script and send email

Hello Experts, Greeting to all of you. I have a requirement, that we have a shell script status.sh that check the status of server and server status shows as status.sh Enterprise Server - Running Admin Server - Shutdown Requirement is like whenever the output shows shutdown it should... (2 Replies)
Discussion started by: aks_1902
2 Replies

3. Shell Programming and Scripting

Run remote command and send email

I am currently try to write a simple script with the following condition, but so far not having luck as the exit code would always be 0. Run remote command to read a file and grep for test word. if test word is in the file, send email. if not, do nothing also possible to ssh to multiple... (3 Replies)
Discussion started by: jaapar
3 Replies

4. Shell Programming and Scripting

Send output of a command as an email

Hello Unix Experts! We are on AIX 6.1 TL6 I am trying to develop a script that does the following: It should send the output of "df -g /directory/folder" command as an email to a user(someone@company.com) This is too simple and i can research on how to do it, but it would be great if... (2 Replies)
Discussion started by: atechcorp
2 Replies

5. Shell Programming and Scripting

Script to Send an email using mail command

Hello all I'm trying to write a script to send an email, so I can be nnotified when something is going wrong with my system. I've tried many options with no luck: mail -s "You've got mail" somebody@example.com echo "Mail Body" | mail -s "Subject" somebody@example.com I tried also to... (1 Reply)
Discussion started by: samer.odeh
1 Replies

6. Shell Programming and Scripting

How to read specific line of text from a Script and send email notification

Hi ! I am a newbie and never officially wrote a shell script before. The requirement for this script is : 1) Read a file called 'bpm.log' and identify if it has a specific text such as 'this is the text'. Its a static value and that is the only text we need to read. 2) If that... (2 Replies)
Discussion started by: atechcorp
2 Replies

7. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

8. Shell Programming and Scripting

help with script to send email and if subject line match is found

Help with script that will check log, then find a match is found, add that as the subject line. 1. The script will always run as a deamon.. and scan the event.log file 2. when a new 101 line is added to the event.log file, have the script check position 5,6 and 7 which is the job name, which... (2 Replies)
Discussion started by: axdelg
2 Replies

9. UNIX for Dummies Questions & Answers

Not able to send email as CC to a ID using Mailx command in HP UX

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

10. Programming

How do I send email from command prompt?

hi all How do I send email from command prompt? i tried this # mutt -s "Test mail" -a /root/Desktop/email1.txt XXXXX@yahoo.co.in < /root/Desktop/email.txt Error sending message, child exited 71 (Operating system error.). Segmentation fault # and also root@localhost ~]# /bin/mail -s "what... (0 Replies)
Discussion started by: munna_dude
0 Replies
Login or Register to Ask a Question