LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-23-2009, 08:45 AM   #1
a7mlinux
Member
 
Registered: Apr 2009
Distribution: RHEL 5, Fedora 10
Posts: 116

Rep: Reputation: 17
Question sendmail help


hello everybody am new in this fourm, I need some help in linux sendmail service, and my question is:
is there a way to send e-mails with "sendmail" using one command
example:
[root@localhost ~]# sendmail to subject
thanks for help

Last edited by a7mlinux; 04-23-2009 at 08:51 AM.
 
Old 04-23-2009, 09:27 AM   #2
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
echo "Subject: <your-subject-here>" | sendmail <user>
 
Old 04-23-2009, 09:45 AM   #3
a7mlinux
Member
 
Registered: Apr 2009
Distribution: RHEL 5, Fedora 10
Posts: 116

Original Poster
Rep: Reputation: 17
thanks alot dudydoo, but I got
syntax error near unexpected token `newline'
 
Old 04-23-2009, 10:46 AM   #4
a7mlinux
Member
 
Registered: Apr 2009
Distribution: RHEL 5, Fedora 10
Posts: 116

Original Poster
Rep: Reputation: 17
is there a way to use shell scripting, and how?
 
Old 04-23-2009, 11:32 AM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by a7mlinux View Post
hello everybody am new in this fourm, I need some help in linux sendmail service, and my question is:
is there a way to send e-mails with "sendmail" using one command
example:
[root@localhost ~]# sendmail to subject
thanks for help
Something like this...

Code:
echo "Hello World" | mail -s "Put Subject Here" name@email.tld
 
Old 04-24-2009, 03:21 PM   #6
a7mlinux
Member
 
Registered: Apr 2009
Distribution: RHEL 5, Fedora 10
Posts: 116

Original Poster
Rep: Reputation: 17
Talking

I used this:
echo "Hello World" | sendmail -s "Put Subject Here" admin@localhost.localdomain

it's working, but I couldn't find the "subjetc" on the /var/spool/mail/admin, I just found "Hello World"
any more help

Last edited by a7mlinux; 04-24-2009 at 03:41 PM.
 
  


Reply



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
Sendmail config questions + Sendmail not reflecting changes to access db wbuik Linux - Networking 2 03-26-2009 05:02 AM
Sendmail ignores aliases with sendmail daemon stopped phavn Solaris / OpenSolaris 1 12-01-2008 02:50 PM
m4 sendmail.mc > sendmail.cf generate unwanted result on OpenSolaris johncsl82 Solaris / OpenSolaris 1 09-08-2008 11:25 PM
sendmail is not working & on $prompt the cmd sendmail hangs Pavan mahoorker Linux - Software 1 04-04-2006 03:57 PM
Sendmail - RunAsUser=sendmail:mail/What files to i have to change ForumKid Linux - Security 45 01-18-2002 11:47 AM

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

All times are GMT -5. The time now is 05:02 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
Open Source Consulting | Domain Registration