Sending and SMS

Clovertech Forums Read Only Archives Cloverleaf General Sending and SMS

  • Creator
    Topic
  • #53099
    Richard Hart
    Participant

      Hi Guys.

      Can anyone recommend a tool with an interface so Cloverleaf can send an SMS for alerting etc.

      Is there one with a ‘mail’ front end so Cloverleaf can just email?

      We are on *nix

      Thanks

    Viewing 2 reply threads
    • Author
      Replies
      • #76558
        David Barr
        Participant

          You can use the email alert action on the standard alerts. Most phone carriers have an e-mail gateway for sending SMS via e-mail.

          Edit: Here’s a list of gateways.

          http://en.wikipedia.org/wiki/List_of_SMS_gateways

        • #76559
          Peter Heggie
          Participant

            Try sending an email from the command line. Some companies shut down access to external email sites from application servers.

            try this code:

            Code:

            #! /usr/bin/ksh

            filename=”/home/hci/scripts/data/mime_file.txt”
            subject=”test email 200″
            sender=””
            recipients=””

            email_mime.tcl “$filename” “$subject” “$sender” “$recipients”

            Code:

            #!/bin/sh
            # The following line is seen as a continuecomment by Tcl
            exec $QUOVADX_INSTALL_DIR/integrator/bin/hcitcl “$0” ${1+”$@”}

            proc create_html_file {filename} {
               set page “”
               set page “$page”
               set page “$pageCloverleaf Email Alerts
               set page “$page”
               set page “$page”
               set page “$page

            Cloverleaf Email Alerts


               set page “$page


               set page “$page


               set page “$page


               set page “$page

            ”    
               set page “$page


               set page “$page


               set page “$page


               set page “$page

            ”    
               set page “$page


               set page “$page

            object error
            to_ormis_sm high queue depth
            ”                
               set page “$page”
               set page “$page”
               
               set fd [open $filename w]
               puts $fd $page
               close $fd
            }

            proc email_html_file { filename subject sender recipients } {
               package require mime
               package require smtp

               set msg [mime::initialize -canonical text/html -file “$filename”]
               smtp::sendmessage “$msg”
                   -header [list Subject “$subject”]
                   -header [list From “$sender”]
                   -header [list To “$recipients”]
                   -servers localhost
                   -ports 25

            }

            proc gts {} {
              set tt [clock format [clock seconds] -format {%y/%m/%d %H:%M:%S} ]
              set ms [format %03d [expr {[clock clicks -milliseconds] % 1000}]]
              return $tt.$ms
            }

            set filename   [lindex $argv 0 ]
            set subject    [lindex $argv 1 ]
            set sender     [lindex $argv 2 ]
            set recipients [lindex $argv 3 ]

            set debug 1
            set pgm “email_mime”

            if {$debug} {echo “[gts] $pgm filename:   $filename”}
            if {$debug} {echo “[gts] $pgm subject:    $subject”}
            if {$debug} {echo “[gts] $pgm sender:     $sender”}
            if {$debug} {echo “[gts] $pgm recipients: $recipients”}

            create_html_file “$filename”

            email_html_file “$filename” “$subject” “$sender” “$recipients”

            exit 0

            You don’t need the mime package actually, but it will prove if you can reach out. Change the sender and receiver address.

            Pete

            Peter Heggie

          • #76560
            Richard Hart
            Participant

              Thanks guys, I appreciate your suggestions.

          Viewing 2 reply threads
          • The forum ‘General’ is closed to new topics and replies.