Find the answer to your Linux question:
Results 1 to 2 of 2
I have a script that at the end i want to email me that it has run because crontab dos not seem to like libnotify. I was given this command ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jan 2010
    Location
    usa
    Posts
    149

    how do i mail my self in a bash script


    I have a script that at the end i want to email me that it has run because crontab dos not seem to like libnotify. I was given this command

    mail - "update done on ubuntu" lancebermudez@gmail.com

    I have no email program but thunderbird installed on my computer I have no idea what I'm doing please help me. below is the script

    #!/bin/bash
    sh /home/lance/bin/aptgetupdate;
    sh /home/lance/bin/aptgetdistupgrade;
    sh /home/lance/bin/updatavast;
    sh /home/lance/bin/setat2;
    notify-send -i /home/lance/bin/clock.png 'Lance update has gone off' -t 0;
    mail - "update done on ubuntu" lancebermudez@gmail.com

    in the terminal i see

    Exiting... (End of file)
    warning: commands will be executed using /bin/sh
    job 124 at Wed Jun 9 15:10:00 2010
    warning: commands will be executed using /bin/sh
    job 125 at Wed Jun 9 02:00:00 2010
    /home/lance/bin/acerupdate: 7: mail: not found
    lance@bermudezl:~/Videos$

  2. #2
    Just Joined! dmk06's Avatar
    Join Date
    Jun 2010
    Location
    San Diego
    Posts
    37
    Sending Email From Your System with sSMTP

    Wouldnít it be useful if your computer could email you? Iíd like to be notified by email when my server is in trouble, but I donít want to run my own mail server. sSMTP is perfect for this; itís a simple way to send email from your system to an SMTP mail server, like Gmailís.

    Hereís how I set up sSMTP on Ubuntu to send mail through my Gmail account.[.....]
    address: tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •