Reegz |
09-07-2006 08:09 AM |
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
|