LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-14-2006, 04:17 PM   #1
sadarax
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 249

Rep: Reputation: 30
Simple sendmail question


All I want is the ability to have a script sent a single one line message to my gmail account when necessary. I am completely new to sendmail. I do not need it to do anything very complicated, I just want know a more or less one line command (if possible) to send an email to a specified gmail account.

After reading through all the manuals and googling the forum, most of it seems to be about configuring sendmail, not actually sending an email. Can someone help me?
 
Old 06-14-2006, 04:27 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,829
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
Just use the mail command:

echo "This is the body" |mail -s "This is the subject" myaccount@gmail.com

Of course this does require that sendmail knows what to do with your mail. (e.g. Has a smart relay setting).
 
Old 06-14-2006, 04:36 PM   #3
sadarax
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 249

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jlightner
Just use the mail command:

echo "This is the body" |mail -s "This is the subject" myaccount@gmail.com

Of course this does require that sendmail knows what to do with your mail. (e.g. Has a smart relay setting).
I have installed sendmail on my system (via apt-get in Ubuntu), but the mail command is not found. I do not know about the relay system...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Fluxbox simple question, simple answer? generallimptoes Linux - Software 3 09-26-2005 02:03 PM
(Probably) Simple sendmail question 46&2 Slackware 13 08-01-2005 01:20 AM
simple sendmail question Avatar Linux - Software 1 07-13-2004 08:20 AM
Installing Programs - A simple question from my simple mind jmp875 Linux - Newbie 6 02-18-2004 09:03 PM
A simple Sendmail configuration question J_Szucs Linux - Newbie 2 11-12-2002 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration