We created a tclproc that we use both in other tclprocs and in embedded tcl within xlates. You don’t need a separate tclproc. You could just write the code as embedded tcl within the xlate.
Not tested, but it goes something like this…
Code:
package require smtp
package require mime
set subject “Email from Cloverleaf”
set body “This is the body”
set to “Robert Robertson”
set from “Cloverleaf”
set recipient “rob@yahoo.com”
set originator “cloverleaf@ourplace.com”
set token [mime::initialize -canonical text/plain -string $body]
mime::setheader $token Subject $subject
mime::setheader $token To $to
mime::setheader $token From $from
smtp::sendmessage $token -recipients $recipient -servers youremailservername -originator $originator
mime::finalize $token
Don’t suppose you have a working sample I can look at?
Thanks,
-Ron
bill bearden wrote:
We created a tclproc that we use both in other tclprocs and in embedded tcl within xlates. You don’t need a separate tclproc. You could just write the code as embedded tcl within the xlate.
Not tested, but it goes something like this…
Code:
package require smtp
package require mime
set subject “Email from Cloverleaf”
set body “This is the body”
set to “Robert Robertson”
set from “Cloverleaf”
set recipient “rob@yahoo.com”
set originator “cloverleaf@ourplace.com”
set token [mime::initialize -canonical text/plain -string $body]
mime::setheader $token Subject $subject
mime::setheader $token To $to
mime::setheader $token From $from
smtp::sendmessage $token -recipients $recipient -servers youremailservername -originator $originator
mime::finalize $token
Don’t suppose you have a working sample I can look at?
Thanks,
-Ron
bill bearden wrote:
We created a tclproc that we use both in other tclprocs and in embedded tcl within xlates. You don’t need a separate tclproc. You could just write the code as embedded tcl within the xlate.
Not tested, but it goes something like this…
Code:
package require smtp
package require mime
set subject “Email from Cloverleaf”
set body “This is the body”
set to “Robert Robertson”
set from “Cloverleaf”
set recipient “rob@yahoo.com”
set originator “cloverleaf@ourplace.com”
set token [mime::initialize -canonical text/plain -string $body]
mime::setheader $token Subject $subject
mime::setheader $token To $to
mime::setheader $token From $from
smtp::sendmessage $token -recipients $recipient -servers youremailservername -originator $originator
mime::finalize $token
Author
Replies
Viewing 2 reply threads
The forum ‘Cloverleaf’ is closed to new topics and replies.