in reply to Sending info through dialup

dirtdart:

I'd suggest that you first find out how to start and stop the dialup connection, which will depend on which distribution of Linux you're using, and what type of dialup account you have. (I used to use a PPP connection back when I used dialup, it was pretty easy to configure and use. Some distros provide a ppp-on and ppp-off script to activate and terminate the link). Then you can write your script, and create a routine to send the EMail, such as:

sub send_message { my ($to, $from, $msg) = @_; # Turn on PPP link, and give it time to connect `ppp-on`; sleep 5; # Create and send message $msg = MIME::Lite->new( From => $from, To => $to, Subject => 'ALERT', ); $msg->attach(Type=>'TEXT', Data=>$msg); $msg->send; # Wait long enough for delivery sleep 5; # Turn off the link `ppp-off`; }

Error checking, correcting bugs and tuneup are your homework. ;^)

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: Sending info through dialup
by dirtdart (Beadle) on Jan 05, 2011 at 13:38 UTC
    Although it doesn't look like OpenSuSE supports ppp-on directly, I was just able to find a page with the bash scripts on it, so that should be simple enough to implement and looks like it'll do exactly what I'm looking for. Thanks for the help!
      If ppp-on is not available, consider using wvdial which should be available on your distribution.