version 1.170, 2006/01/09 20:07:27
|
version 1.171, 2006/01/10 02:11:17
|
Line 296 sub sendemail {
|
Line 296 sub sendemail {
|
$msg->to($to); |
$msg->to($to); |
$msg->subject('[LON-CAPA] '.$subject); |
$msg->subject('[LON-CAPA] '.$subject); |
if (my $fh = $msg->open()) { |
if (my $fh = $msg->open()) { |
print $fh $body; |
print $fh $body; |
$fh->close; |
$fh->close; |
} |
} |
} |
} |
|
|
Line 307 sub sendnotification {
|
Line 307 sub sendnotification {
|
my ($to,$touname,$toudom,$subj,$crit,$text)=@_; |
my ($to,$touname,$toudom,$subj,$crit,$text)=@_; |
my $sender=$env{'environment.firstname'}.' '.$env{'environment.lastname'}; |
my $sender=$env{'environment.firstname'}.' '.$env{'environment.lastname'}; |
unless ($sender=~/\w/) { |
unless ($sender=~/\w/) { |
$sender=$env{'user.name'}.'@'.$env{'user.domain'}; |
$sender=$env{'user.name'}.'@'.$env{'user.domain'}; |
} |
} |
my $critical=($crit?' critical':''); |
my $critical=($crit?' critical':''); |
$text=~s/\<\;/\</gs; |
$text=~s/\<\;/\</gs; |
Line 609 sub user_normal_msg {
|
Line 609 sub user_normal_msg {
|
$domain,$user); |
$domain,$user); |
my $msgforward=$userenv{'msgforward'}; |
my $msgforward=$userenv{'msgforward'}; |
if ($msgforward) { |
if ($msgforward) { |
foreach (split(/\,/,$msgforward)) { |
foreach (split(/\,/,$msgforward)) { |
my ($forwuser,$forwdomain)=split(/\:/,$_); |
my ($forwuser,$forwdomain)=split(/\:/,$_); |
$status.= |
$status.= |
&user_normal_msg_raw($forwuser,$forwdomain,$subject,$message, |
&user_normal_msg_raw($forwuser,$forwdomain,$subject,$message, |
$citation,$baseurl,$attachmenturl,$toperm,undef,undef,$sentmessage).' '; |
$citation,$baseurl,$attachmenturl,$toperm,undef,undef,$sentmessage).' '; |
} |
} |
} else { |
} else { |
$status=&user_normal_msg_raw($user,$domain,$subject,$message, |
$status=&user_normal_msg_raw($user,$domain,$subject,$message, |
$citation,$baseurl,$attachmenturl,$toperm,undef,undef,$sentmessage); |
$citation,$baseurl,$attachmenturl,$toperm,undef,undef,$sentmessage); |
} |
} |
return $status; |
return $status; |
} |
} |
|
|
sub store_sent_mail { |
sub store_sent_mail { |
my ($msgid,$message) = @_; |
my ($msgid,$message) = @_; |
my $status =' '.&Apache::lonnet::critical( |
my $status =' '.&Apache::lonnet::critical( |
'put:'.$env{'user.domain'}.':'.$env{'user.name'}. |
'put:'.$env{'user.domain'}.':'.$env{'user.name'}. |
':nohist_email_sent:'. |
':nohist_email_sent:'. |
&Apache::lonnet::escape($msgid).'='. |
&Apache::lonnet::escape($msgid).'='. |
&Apache::lonnet::escape($message),$env{'user.home'}); |
&Apache::lonnet::escape($message),$env{'user.home'}); |
return $status; |
return $status; |
} |
} |
|
|