--- loncom/interface/lonmsg.pm 2006/12/27 18:00:00 1.192 +++ loncom/interface/lonmsg.pm 2006/12/27 20:42:12 1.193 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.192 2006/12/27 18:00:00 raeburn Exp $ +# $Id: lonmsg.pm,v 1.193 2006/12/27 20:42:12 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -407,10 +407,14 @@ sub user_crit_msg_raw { if (defined($sentmessage)) { $$sentmessage = $packed_message; } - (undef,my $packed_message_no_citation) = + if ($env{'request.course.id'} eq '') { + (undef,my $packed_message_no_citation) = &packagemsg($subject,$message,undef,undef,undef,$user,$domain, $msgid); - $status .= &store_sent_mail($msgid,$packed_message_no_citation); + if ($status eq 'ok' || $status eq 'con_delayed') { + &store_sent_mail($msgid,$packed_message_no_citation); + } + } } else { $status='no_host'; } @@ -540,7 +544,9 @@ sub user_normal_msg_raw { (undef,my $packed_message_no_citation) = &packagemsg($subject,$message,undef,$baseurl,$attachmenturl, $user,$domain,$currid,undef,$crsmsgid,$symb,$error); - $status .= &store_sent_mail($msgid,$packed_message_no_citation); + if ($status eq 'ok' || $status eq 'con_delayed') { + &store_sent_mail($msgid,$packed_message_no_citation); + } } } else { $status='no_host';