smtp - Client-side tcl implementation of the smtp protocol
SYNOPSIS
package require Tcl
package require mime ?1.3.2?
package require smtp ?1.3.2?
|
The smtp library package provides the client side of the smtp protocol.
proc send_simple_message {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 $email_server
mime::finalize $token
}
send_simple_message someone@somewhere.com localhost \\
"This is the subject." "This is the message."
|