version 1.216, 2008/11/28 14:36:50
|
version 1.218, 2008/12/19 02:43:52
|
Line 224 sub packagemsg {
|
Line 224 sub packagemsg {
|
$citation=&HTML::Entities::encode($citation,'<>&"'); |
$citation=&HTML::Entities::encode($citation,'<>&"'); |
$subject =&HTML::Entities::encode($subject,'<>&"'); |
$subject =&HTML::Entities::encode($subject,'<>&"'); |
#remove machine specification |
#remove machine specification |
$baseurl =~ s|^http://[^/]+/|/|; |
$baseurl =~ s|^https?://[^/]+/|/|; |
$baseurl =&HTML::Entities::encode($baseurl,'<>&"'); |
$baseurl =&HTML::Entities::encode($baseurl,'<>&"'); |
#remove machine specification |
#remove machine specification |
$attachmenturl =~ s|^http://[^/]+/|/|; |
$attachmenturl =~ s|^https?://[^/]+/|/|; |
$attachmenturl =&HTML::Entities::encode($attachmenturl,'<>&"'); |
$attachmenturl =&HTML::Entities::encode($attachmenturl,'<>&"'); |
my $course_context = &get_course_context(); |
my $course_context = &get_course_context(); |
my $now=time; |
my $now=time; |
Line 430 sub sendemail {
|
Line 430 sub sendemail {
|
} |
} |
} |
} |
$body= |
$body= |
"*** ".&mt_user($user_lh,'This is an automatic message generated by the LON-CAPA system.')."\n". |
"*** ".&mt_user($user_lh,'This is an automatic e-mail generated by the LON-CAPA system.')."\n". |
"*** ".($senderaddress?&mt_user($user_lh,'You can reply to this message'):&mt_user($user_lh,'Please do not reply to this address.')."\n*** ". |
"*** ".($senderaddress?&mt_user($user_lh,'You can reply to this e-mail'):&mt_user($user_lh,'Please do not reply to this address.')."\n*** ". |
&mt_user($user_lh,'A reply will not be received by the recipient!'))."\n\n".$body; |
&mt_user($user_lh,'A reply will not be received by the recipient!'))."\n\n".$body; |
my $msg = new Mail::Send; |
my $msg = new Mail::Send; |
$msg->to($to); |
$msg->to($to); |
Line 455 sub sendnotification {
|
Line 455 sub sendnotification {
|
|
|
$text=~s/\<\;/\</gs; |
$text=~s/\<\;/\</gs; |
$text=~s/\>\;/\>/gs; |
$text=~s/\>\;/\>/gs; |
my $url='http://'. |
my $homeserver = &Apache::lonnet::homeserver($touname,$toudom); |
&Apache::lonnet::hostname(&Apache::lonnet::homeserver($touname,$toudom)). |
my $protocol = $Apache::lonnet::protocol{$homeserver}; |
'/adm/email?username='.$touname.'&domain='.$toudom; |
$protocol = 'http' if ($protocol ne 'https'); |
|
my $url = $protocol.'://'.&Apache::lonnet::hostname($homeserver). |
|
'/adm/email?username='.$touname.'&domain='.$toudom; |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid, |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid, |
$symb,$error) = &Apache::lonmsg::unpackmsgid($msgid); |
$symb,$error) = &Apache::lonmsg::unpackmsgid($msgid); |
my ($coursetext,$body,$bodybegin,$bodysubj,$bodyend); |
my ($coursetext,$body,$bodybegin,$bodysubj,$bodyend); |