Diff for /loncom/interface/lonmsg.pm between versions 1.239.2.4.2.1 and 1.239.2.5

version 1.239.2.4.2.1, 2023/01/23 17:52:06 version 1.239.2.5, 2024/02/08 03:09:10
Line 455  sub sendemail { Line 455  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 472  sub sendemail { Line 475  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 512  sub sendnotification { Line 520  sub sendnotification {
   
     $text=~s/\&lt\;/\</gs;      $text=~s/\&lt\;/\</gs;
     $text=~s/\&gt\;/\>/gs;      $text=~s/\&gt\;/\>/gs;
     my $touhome = &Apache::lonnet::homeserver($touname,$toudom);      my $homeserver = &Apache::lonnet::homeserver($touname,$toudom);
     my $url = &Apache::lonnet::url_prefix('',$toudom,$touhome,'email').      my $protocol = $Apache::lonnet::protocol{$homeserver};
       $protocol = 'http' if ($protocol ne 'https');
       my $url = $protocol.'://'.&Apache::lonnet::hostname($homeserver).
               '/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.239.2.4.2.1  
changed lines
  Added in v.1.239.2.5


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