- This topic has 14 replies, 5 voices, and was last updated 11 years, 11 months ago by .
-
Topic
-
proc fnSendMail { emailFrom emailSubject emailBody emailRecipients args } { package require mime
package require smtp
if [ catch {
set token [mime::initialize -canonical text/plain -string $emailBody]
mime::setheader $token Subject $emailSubject
smtp::sendmessage $token -header
-
-header “To $emailRecipients” -servers “YourSMTP.YourDomain.ca”
mime::finalize $token
return 0
} err ] {
#puts “fnSendMail Error: $err”
return $err
}
}
usage: fnSendMail $emailFrom $emailSubject $emailBody $emailRecipients
Note: In the function you need to replace the value of “YourSMTP.YourDomain.ca” with your SMTP server info.
Viewing 13 reply threads
Viewing 13 reply threads
- The forum ‘Cloverleaf’ is closed to new topics and replies.