Send Mail Command Line

Discussion in 'General' started by mphayesuk, Jun 24, 2006.

  1. mphayesuk

    mphayesuk Member

    I have almost written my backup script but what I want to do is email the log file my script creates.

    So what I need is an example of how to email from the command line (shell script)

    Thanks
     
  2. vlsimpson

    vlsimpson New Member

    The old Berkeley mail prog:
    cat logfile | mail -s 'backup log' emailaddress

    for nail (if you have it)
    nail -s 'backup log' -a logfile emailaddress
     
  3. mphayesuk

    mphayesuk Member

    Well its using postfix, suse10 and everything is setup as the guides by falko, I will try the two methods you have put on in the morning.

    Thanks
     
  4. vlsimpson

    vlsimpson New Member

    I forgot mutt. You can use it similarly to my previous example.
     
  5. mphayesuk

    mphayesuk Member

    Works great thanks
     

Share This Page