Diff for /loncom/interface/lonmsg.pm between versions 1.248 and 1.251

version 1.248, 2022/01/18 17:33:13 version 1.251, 2024/02/08 03:02:12
Line 454  sub sendemail { Line 454  sub sendemail {
         $replytoaddress = 'do-not-reply@'.$hostname;          $replytoaddress = 'do-not-reply@'.$hostname;
     } else {      } else {
         my %senderemails;          my %senderemails;
         my $have_sender;          my ($have_sender,$setreplyto);
         if ($env{'form.reply_to_addr'}) {          if ($env{'form.reply_to_addr'}) {
             my ($replytoname,$replytodom) = split(/:/,$env{'form.reply_to_addr'});              my ($replytoname,$replytodom) = split(/:/,$env{'form.reply_to_addr'});
             if (!($replytoname eq $env{'user.name'} && $replytodom eq $env{'user.domain'})) {              if (($replytoname eq $env{'user.name'} && $replytodom eq $env{'user.domain'})) {
                   $setreplyto = 1;
               } else {
                 if (&Apache::lonnet::homeserver($replytoname,$replytodom) ne 'no_host') {                  if (&Apache::lonnet::homeserver($replytoname,$replytodom) ne 'no_host') {
                     %senderemails =                       %senderemails = 
                         &Apache::loncommon::getemails($replytoname,$replytodom);                          &Apache::loncommon::getemails($replytoname,$replytodom);
                     $have_sender = 1;                      $have_sender = 1;
                       $setreplyto = 1;
                 }                  }
             }              }
         }          }
Line 471  sub sendemail { Line 474  sub sendemail {
         foreach my $type ('permanentemail','critnotification','notification') {          foreach my $type ('permanentemail','critnotification','notification') {
             if ($senderemails{$type}) {              if ($senderemails{$type}) {
                 ($senderaddress) = split(/,/,$senderemails{$type});                  ($senderaddress) = split(/,/,$senderemails{$type});
                 last if ($senderaddress);                  if ($senderaddress) {
                       if ($setreplyto) {
                           $replytoaddress = $senderaddress;
                       }
                       last;
                   }
             }              }
         }          }
     }      }
Line 510  sub sendnotification { Line 518  sub sendnotification {
   
     $text=~s/\&lt\;/\</gs;      $text=~s/\&lt\;/\</gs;
     $text=~s/\&gt\;/\>/gs;      $text=~s/\&gt\;/\>/gs;
     my $homeserver = &Apache::lonnet::homeserver($touname,$toudom);      my $touhome = &Apache::lonnet::homeserver($touname,$toudom);
     my $hostname = &Apache::lonnet::hostname($homeserver);      my $url = &Apache::lonnet::url_prefix('',$toudom,$touhome,'email').
     my $protocol = $Apache::lonnet::protocol{$homeserver};  
     $protocol = 'http' if ($protocol ne 'https');  
 #FIXME  
     my $url = $protocol.'://'.$hostname.  
               '/adm/email?username='.$touname.'&domain='.$toudom.                '/adm/email?username='.$touname.'&domain='.$toudom.
               '&display='.&escape($msgid);                '&display='.&escape($msgid);
     my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,      my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,

Removed from v.1.248  
changed lines
  Added in v.1.251


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>