Try sending an email from the command line. Some companies shut down access to external email sites from application servers.
try this 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”
#!/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 “$page
Cloverleaf Email Alerts”
set page “$page”
set page “$page”
set page “$page
Cloverleaf Email Alerts
”
set page “$page
”
set page “$page
”
set page “$page
object |
”
set page “$page
error |
”
set page “$page
”
set page “$page
”
set page “$page
to_ormis_sm |
”
set page “$page
high queue depth |
”
set page “$page
”
set page “$page
”
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