Qchem Posted December 4, 2003 Report Share Posted December 4, 2003 I'm writing a bash script to backup some machines and eventually I want it to become a cron job (but thats a different story). I basically want to use mail (or something similar) to send a message to my user along the lines that the backup was complete. Does anyone have any experience of doing this? Thanks, Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 4, 2003 Report Share Posted December 4, 2003 assuming your machine has access to a working mail server, its all pretty straight forward. i used it once to send simple mail messages. i even experimented doing some attachments via uuencode. and its all command-line. i tried doing a distributed.net send and receive script but i left my previous job before i can fullfill it. i was able to do the send part though. :) ciao! Quote Link to comment Share on other sites More sharing options...
Qchem Posted December 4, 2003 Author Report Share Posted December 4, 2003 I think sendmail is configured on the boxen I want it to be, to the point that I can send a test mail via the command line. I have no idea how to specify what text is actually sent via mail though. For example if I use the command line: # mail -s Foo root Bar Ctrl-D CC: # works, but obviously as part of a shell script mail -s Foo root Bar . does not work. Any ideas how I can specify the body of the mail? Thanks, Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 5, 2003 Report Share Posted December 5, 2003 you need to specify everything in one line. sorry im not in a linux box (if you see me online now its probably from a windows box as i dont have net at home) but everything is in the manpage. when i get some free time ill try to do it in cygwin if there is a port. ciao! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.