Results 1 to 5 of 5
I've got a super-simple script that uses mail to send me update-log files, but the only problem I've got with it is that I need to manually hit CTRL+D to ...
- 03-12-2008 #1Just Joined!
- Join Date
- Nov 2007
- Location
- Salt Lake City, UT, USA
- Posts
- 32
cron job that mails log files?
I've got a super-simple script that uses mail to send me update-log files, but the only problem I've got with it is that I need to manually hit CTRL+D to send the message.
A co-worker recommended using sendmail, but I don't see anything in the manual about attachments. Then I wonder if I could use uuencode piped to sendmail to send these messages ..... and the more complicated it gets.
Does anyone know how I can use mail to automatically send a message without manually hitting CTRL+D?
mail -s 'Logs and stuff' -a patchesdesc.notinst -a patchesdesc.inst -a patches.notinst bknorr@dooodaadeelalalala.com
- 03-14-2008 #2
Will sound silly but it works
Yes you are echoing nothing there, its just a space.Code:echo | mail -s <blah blah>
- 03-14-2008 #3Linux User
- Join Date
- Jun 2007
- Posts
- 318
Try this:
Code:mail -s 'Logs and stuff' -a patchesdesc.notinst -a patchesdesc.inst -a patches.notinst bknorr@dooodaadeelalalala.com << ++EOT++ ++EOT++
- 03-17-2008 #4
Are you guys serious? This command allows a user to send a piece of my from his/her current IP address without having to use a server or some other silly system?
I've been looking for something like that for ages. I didn't know it was as simple as that.
- 03-17-2008 #5
There is nothing special going on here. Emails are sent in this way only. The trick is to get a sendmail (like) server running on something that has a global IP address. Every mailing service does this.
Ask yourself this "Do you need some special stuff to send postcards?" No, all you need is a post-box or an agent! Same here.


Reply With Quote