This is a discussion on Re: FreeBSD or qmail problem? within the alt.comp.mail.qmail forums, part of the Mail Servers and Related category; jtattcg@yahoo.com (toy) wrote in message news:<ba52408e.0306240852.193f2849@posting.google. com>... > Hi, I used ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
jtattcg@yahoo.com (toy) wrote in message news:<ba52408e.0306240852.193f2849@posting.google. com>...
> Hi, I used to be able to send mail through my crontab by putting in a > 1 line statement: > echo "test" | mail -s "testsubject" me@me.com > But this doesn't work anymore, instead, it puts me in interactive mode > and expects me to write the body of the message and press Control-D > when I am done. I recently upgraded to FreeBSD 5.1 and switched from > sendmail to qmail so I am not sure if it is a FreeBSD problem or qmail > problem. How can I change my 1 line "script" to work > non-interactively? The man page for mail was of no help. > Thanks. If you want the e-mail to have a subject and a body, I would put the following into a file (named testfile.txt here), perhaps in your home directory: Subject: testsubject test Then put this into your crontab: cat $HOME/testfile.txt | /var/qmail/bin/qmail-inject me@me.com If you only care about receiving the email with a subject and no body, you can simply use this: echo "Test" | /var/qmail/bin/qmail-inject me@me.com Good Luck. BTW - the man pages for qmail-inject might help you here. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|