LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2006, 09:09 AM   #1
Reegz
Member
 
Registered: Mar 2006
Location: South Africa
Distribution: Ubuntu, Slackware, openSuse
Posts: 44

Rep: Reputation: 15
Sendmail issue


Hi guys,

I'm using sendmail on Redhat 9.

I would like to set a cron job to mail reports to me. What I am having trouble with is sending a mail using a sendmail command.

This is how im currently doing it

Code:
[root@email-svr mail]# telnet email-svr 25
Trying 127.0.0.1...
Connected to email-svr (127.0.0.1).
Escape character is '^]'.
220 email-svr ESMTP Sendmail 8.12.8/8.12.8; Thu, 7 Sep 2006 13:55:39 +0200
helo email.com
250 email-svr Hello email-svr [127.0.0.1], pleased to meet you
MAIL FROM me@email.com
501 5.5.2 Syntax error in parameters scanning "FROM"
MAIL FROM:me@email.com
250 2.1.0 me@email.com... Sender ok
RCPT TO:me@email.com
250 2.1.5 me@email.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Subject:Viv le test
Testing le sendmail
.
250 2.0.0 k87BtdJq027409 Message accepted for delivery
quit
221 2.0.0 email-svr closing connection
Connection closed by foreign host.
This works. I've seen elsewhere on the forum something like this

Code:
   sendmail -t < mailfile
My question is what needs to be in "mailfile" and in what format.

Thanks
 
Old 09-07-2006, 10:00 AM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
sendmail -s "hello" email@email < file

where your file can be any file, txt, html or anything
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail Issue haym37 Linux - Software 3 07-24-2006 07:54 AM
Sendmail issue? basketkase999 Linux - Software 1 03-07-2005 10:25 PM
sendmail issue archangel Linux - General 6 11-13-2002 09:17 AM
sendmail issue archangel Linux - Networking 1 11-13-2002 06:14 AM
sendmail issue iquadri1 Linux - Networking 1 09-29-2001 03:02 PM


All times are GMT -5. The time now is 08:35 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