Reply To: Email

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Email Reply To: Email

#58697
Barry Sheesley
Participant

    Todd,

    We have used the Tcl mime and SMTP packages to send email.  Here is a link that I found helpful to review:

    http://www.oche.de/~akupries/soft/mail/mime.html

    The Tcl proc we use is the following:

    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 $fromaddr

      mime::finalize $token

        return

      }

      The variable “email_server” needs to be a valid email server.  You could modify this to pass a list of servers if needed. We pass the actual IP address of the server although I’m sure you could pass the server name as well.

      The “recipient” variable can actually contain multiple email addresses… I’m assuming a comma separated list but I haven’t tried that yet.