version 1.39, 2002/09/16 20:06:12
|
version 1.43, 2002/12/23 18:02:44
|
Line 119 sub unpackmsgid {
|
Line 119 sub unpackmsgid {
|
return ($sendtime,$shortsubj,$fromname,$fromdomain,$status{$msgid}); |
return ($sendtime,$shortsubj,$fromname,$fromdomain,$status{$msgid}); |
} |
} |
|
|
|
# ============================================================= Check for email |
|
|
|
sub newmail { |
|
if ((time-$ENV{'user.mailcheck.time'})>300) { |
|
my %what=&Apache::lonnet::get('email_status',['recnewemail']); |
|
&Apache::lonnet::appenv('user.mailcheck.time'=>time); |
|
if ($what{'recnewemail'}>0) { return 1; } |
|
} |
|
return 0; |
|
} |
|
|
# =============================== Automated message to the author of a resource |
# =============================== Automated message to the author of a resource |
|
|
sub author_res_msg { |
sub author_res_msg { |
Line 199 sub user_crit_received {
|
Line 210 sub user_crit_received {
|
&user_normal_msg($contents{'sendername'},$contents{'senderdomain'}, |
&user_normal_msg($contents{'sendername'},$contents{'senderdomain'}, |
'Receipt: '.$ENV{'user.name'}.' at '.$ENV{'user.domain'}, |
'Receipt: '.$ENV{'user.name'}.' at '.$ENV{'user.domain'}, |
'User '.$ENV{'user.name'}.' at '.$ENV{'user.domain'}. |
'User '.$ENV{'user.name'}.' at '.$ENV{'user.domain'}. |
' acknowledged receipt of message "'. |
' acknowledged receipt of message'."\n".' "'. |
$contents{'subject'}.'" dated '.$contents{'time'}.".\n\n" |
$contents{'subject'}.'"'."\n".'dated '. |
.'Message ID: '.$contents{'msgid'}):'no msg req'); |
$contents{'time'}.".\n" |
|
):'no msg req'); |
$status.=' trans: '. |
$status.=' trans: '. |
&Apache::lonnet::put( |
&Apache::lonnet::put( |
'nohist_email',{$contents{'msgid'} => $message{$msgid}}); |
'nohist_email',{$contents{'msgid'} => $message{$msgid}}); |
Line 229 sub user_normal_msg_raw {
|
Line 241 sub user_normal_msg_raw {
|
'put:'.$domain.':'.$user.':nohist_email:'. |
'put:'.$domain.':'.$user.':nohist_email:'. |
&Apache::lonnet::escape($msgid).'='. |
&Apache::lonnet::escape($msgid).'='. |
&Apache::lonnet::escape($message),$homeserver); |
&Apache::lonnet::escape($message),$homeserver); |
|
&Apache::lonnet::put |
|
('email_status',{'recnewemail'=>time},$domain,$user); |
} else { |
} else { |
$status='no_host'; |
$status='no_host'; |
} |
} |
Line 582 sub handler {
|
Line 596 sub handler {
|
['display','replyto','forward','markread','markdel','markunread', |
['display','replyto','forward','markread','markdel','markunread', |
'sendreply','compose','sendmail','critical','recname','recdom']); |
'sendreply','compose','sendmail','critical','recname','recdom']); |
|
|
|
# ------------------------------------------------------ They checked for email |
|
&Apache::lonnet::put('email_status',{'recnewemail'=>0}); |
# --------------------------------------------------------------- Render Output |
# --------------------------------------------------------------- Render Output |
|
|
$r->print('<html><head><title>EMail and Messaging</title></head>'. |
$r->print('<html><head><title>EMail and Messaging</title></head>'. |
Line 606 $content{'sendername'},$content{'senderd
|
Line 622 $content{'sendername'},$content{'senderd
|
'"><b>Forward</b></a></td>'. |
'"><b>Forward</b></a></td>'. |
'<td><a href="/adm/email?markunread='.&Apache::lonnet::escape($msgid). |
'<td><a href="/adm/email?markunread='.&Apache::lonnet::escape($msgid). |
'"><b>Mark Unread</b></a></td>'. |
'"><b>Mark Unread</b></a></td>'. |
|
'<td><a href="/adm/email?markdel='.&Apache::lonnet::escape($msgid). |
|
'"><b>Delete</b></a></td>'. |
'<td><a href="/adm/email"><b>Display all Messages</b></a></td>'. |
'<td><a href="/adm/email"><b>Display all Messages</b></a></td>'. |
'</tr></table><p><pre>'. |
'</tr></table><p><pre>'. |
&Apache::lontexconvert::msgtexconverted($content{'message'}). |
&Apache::lontexconvert::msgtexconverted($content{'message'}). |