email from windows platform

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf email from windows platform

  • Creator
    Topic
  • #55771
    Bryan Goldader
    Participant

      I am trying to email error encounters from either an Xlate or Tcl script out of an Xlate from cloverleaf running on a windows platform.

      I have searched through and nothing really stuck out.

      thanks in advance.

    Viewing 1 reply thread
    • Author
      Replies
      • #86456
        Jim Kosloskey
        Participant

          What platform – unix or windows?

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #86457
          bill bearden
          Participant

            Bryan,

            Because people had different ideas at different times, we have used 3 different methods for sending email in Cloverleaf programs. Two are executable Windows programs: bmail.exe and POSTIE.EXE. We “exec” these in Tcl code. I wasn’t around at the time so I don’t know much about where those programs came from.

            More recently, we have also used an all-Tcl method for sending email. Tcl comes with libraries for email (and lots of other things). The very basics look something like this:

            Code:

             package require smtp
             package require mime
             set token [mime::initialize -canonical text/plain -string “Email body here.”]
             mime::setheader $token Subject “Your Subject Here”
             mime::setheader $token To “Firstname Lastname ”
             mime::setheader $token From “servername@company.com”
             smtp::sendmessage $token
               -recipients “firstname.lastname@company.com”
               -servers “emailServerNameHere”
               -originator “”
             mime::finalize $token
             unset token

            The code above could have typos since I tried to simplify what we actually use. I also tried to give parameters that show what the format should be.

            Bill

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.