diff options
-rwxr-xr-x | GradeBook_lib.tcl | 7 |
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 {} { |