The current version of jacl (1.4.1) can not use the smtp package in tcllib, because of lack of support for the fileevent command. The email functions of java are easy to use, however. The first step is making sure a mail.jar file is in the CLASSPATH. Aejaks has mail-1.4.jar in the jetty-06.0.1/lib/plus directory so nothing extra needs to be done. Other jacl users may need to download it. A tiny amount of java code needs to be used if the email host uses password authentication. The hyde package makes handling java code straightforward. Its use is shown below. === package require java package require hyde hyde::jclass SMTPAuthenticator -extends javax.mail.Authenticator -import {javax.mail.* } { String userName = " ", password = " "; public SMTPAuthenticator(String userName, String password) { this.userName = userName; this.password = password; } public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(userName, password); } } === The code creates the SMTPAuthenticator class with a constructor which saves the username and password, so that the PasswordAuthentication method can use them when needed. After that is set up, the following proc can be used to send mail. === proc sendMail args { # Set up default arguments array set opts { -user me@mymail.com -password ***** -host smtp.gmail.com -port 465 -to you@yourmail.com -subject "Testing email" -text "Not much to say" -auth true -useTLS true } # Minimal error checking: odd number of args, first of pair not a valid option name set optsLength [llength [array get opts]] if {[llength $args] % 2 != 0} {puts "Unpaired option request"; return} array set opts $args if {[llength [array get opts]] != $optsLength} {puts "Illegal option request"; return} # puts [array get opts] set props [java::new java.util.Properties] $props put mail.smtp.user $opts(-user) $props put mail.smtp.host $opts(-host) $props put mail.smtp.port $opts(-port) $props put mail.smtp.auth $opts(-auth) $props put mail.smtp.starttls.enable $opts(-useTLS) $props put mail.smtp.socketFactory.port $opts(-port) $props put mail.smtp.socketFactory.class javax.net.ssl.SSLSocketFactory $props put mail.smtp.socketFactory.fallback false set auth [java::new hyde.SMTPAuthenticator $opts(-user) $opts(-password)] set session [java::call javax.mail.Session getInstance $props $auth] set msg [java::new javax.mail.internet.MimeMessage $session] $msg setText $opts(-text) $msg setSubject $opts(-subject) $msg setFrom [java::new javax.mail.internet.InternetAddress $opts(-user)] foreach recip $opts(-to) { set addressTo [java::new javax.mail.internet.InternetAddress $recip] $msg addRecipient [java::field javax.mail.Message.RecipientType TO] $addressTo } java::call javax.mail.Transport send $msg } === Any or none of the options can be over-ridden. The -to option can be a list of any length. A call might look like: === sendMail -user garfield@jon.arbuckle.com -to {trim@flinders.com.au Mrs.Norris@hogwarts.edu} -subject Meow -text "Purr, purr" === <>Enter Category Here