aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-12-18 12:46:27 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2012-12-18 12:46:27 -0500
commit503c04d9c32610998aab51c46191b4de2c1e844a (patch)
tree0c58f7e996412f4f3719fc6e103224752ef8e1dc
parentd1191c062e2c14b44c5bfe16dbd593ce6d400700 (diff)
downloadGradeBook-503c04d9c32610998aab51c46191b4de2c1e844a.tar.gz
GradeBook-503c04d9c32610998aab51c46191b4de2c1e844a.zip
email sended has more log info and a catch for file delition
-rwxr-xr-xGradeBook_lib.tcl7
1 files changed, 5 insertions, 2 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index f379533..bf4d7ca 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -1070,11 +1070,14 @@ proc SendNewPassword2User { user password } {
puts $fp "$password"
puts $fp "------------------------------------------"
close $fp
- if { [catch {exec mail -s "New password for $CourseTitle" $user < $tmp_msg_file} msg ] } {
+ if { [catch {exec mail -s "New password for $CourseTitle" "$user" < $tmp_msg_file} msg ] } {
htmlErrorMsg "Something seems to have gone wrong during mailing the password. Information about it: $::errorInfo"
+ dbg "Something seems to have gone wrong during mailing the password for {$user}. Information about it: $::errorInfo" msg_level_critical
}
#now it is safe to delete temporary file
- file delete $tmp_msg_file
+ if { [catch {file delete $tmp_msg_file} msg] } {
+ dbg "Cannot delete file {$tmp_msg_file} with temporary password message for user {$user}" msg_level_critical
+ }
}
proc LogMeOn {} {