infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
wanting example tcl proc for sending alert info to emails
Nancy McDaniel
Does anyone having any sample tcl procedures that they have created to send alert info to emails? I have gotten my alerts to call .bat files but would like to get more information on the triggered alerts to send on the emails.
thanks,
Nancy
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Barry Sheesley
If you go on the Clovertech website and search for SMTP, you will find a post from John Harvey titled "working with email alerts" that gives you an example of the TCL proc you are looking for. I expanded on his proc slightly by adding a "From Address" parameter... see sendEmailMessage proc below.
proc sendEmailMessage {fromaddr recipient email_server subject body} {
package require smtp
package require mime
set token [mime::initialize -canonical text/plain -string $body]
mime::setheader $token Subject $subject
smtp::sendmessage $token -recipients $recipient -servers
-debug 1 -originator $fromaddrmime::finalize $token return}Here is the TCL proc that calls the sendEmailMessage proc. I call this from within my .bat file using the command "call tcl -c censusAlert".proc censusAlert {} {sendEmailMessage "DoNotReply@abc.com" "jdoe@abc.com" "10.1.5.123" "Quovadx Census Alert!" "Interface for Census is down!"sendEmailMessage "DoNotReply@abc.com" "kbrown@abc.com" "10.1.5.123" "Quovadx Census Alert!" "Interface for Census is down!"}You need to have tcllib installed in order to use the API to send email. You can find the download and instructions at
<a href="
http://www.tcl.tk/software/tcllib/
" class="bbcode_url">
http://www.tcl.tk/software/tcllib/
It took me a little while to get all this installed and working but it's a great tool now.