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
[root@email-svr mail]# telnet email-svr 25
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
250 email-svr Hello email-svr [127.0.0.1], pleased to meet you
MAIL FROM firstname.lastname@example.org
501 5.5.2 Syntax error in parameters scanning "FROM"
250 2.1.0 email@example.com... Sender ok
250 2.1.5 firstname.lastname@example.org... Recipient ok
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
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
sendmail -t < mailfile
My question is what needs to be in "mailfile" and in what format.