[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmsg.pm lonsupportreq.pm

raeburn raeburn at source.lon-capa.org
Tue Jun 9 17:32:33 EDT 2020


raeburn		Tue Jun  9 21:32:33 2020 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonmsg.pm lonsupportreq.pm 
  Log:
  - Provide 'Reply To' address set in lonmsg.pm when calling mime_email() in
    loncommon.pm
  - Update documentation for mime_email().
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1342 loncom/interface/loncommon.pm:1.1343
--- loncom/interface/loncommon.pm:1.1342	Mon Jun  1 20:35:02 2020
+++ loncom/interface/loncommon.pm	Tue Jun  9 21:32:32 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1342 2020/06/01 20:35:02 raeburn Exp $
+# $Id: loncommon.pm,v 1.1343 2020/06/09 21:32:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -15229,6 +15229,8 @@
 
 from -              Sender's email address
 
+replyto -           Reply-To email address
+
 to -                Email address of recipient
 
 subject -           Subject of email
@@ -15239,8 +15241,6 @@
 
 bcc -               Blind carbon copy email address
 
-type -              File type of attachment
-
 attachment_path -   Path of file to be attached
 
 file_name -         Name of file to be attached
@@ -15257,8 +15257,9 @@
 ############################################################
 
 sub mime_email {
-    my ($from, $to, $subject, $body, $cc_string, $bcc, $attachment_path, 
-        $file_name, $attachment_text) = @_;
+    my ($from,$replyto,$to,$subject,$body,$cc_string,$bcc,$attachment_path, 
+        $file_name,$attachment_text) = @_;
+ 
     my $msg = MIME::Lite->new(
              From    => $from,
              To      => $to,
@@ -15266,6 +15267,9 @@
              Type    =>'TEXT',
              Data    => $body,
              );
+    if ($replyto ne '') {
+        $msg->add("Reply-To" => $replyto);
+    }
     if ($cc_string ne '') {
         $msg->add("Cc" => $cc_string);
     }
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.244 loncom/interface/lonmsg.pm:1.245
--- loncom/interface/lonmsg.pm:1.244	Thu Dec 27 18:14:25 2018
+++ loncom/interface/lonmsg.pm	Tue Jun  9 21:32:32 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.244 2018/12/27 18:14:25 raeburn Exp $
+# $Id: lonmsg.pm,v 1.245 2020/06/09 21:32:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -470,8 +470,8 @@
     } else {
         # Otherwise build and send the email
         $subject = '[LON-CAPA] '.$subject;
-        &Apache::loncommon::mime_email($senderaddress, $to, $subject, $body, ,'',
-                                        '', $attachmenturl, '', '');
+        &Apache::loncommon::mime_email($senderaddress,$replytoaddress,$to,
+                                       $subject,$body,'','',$attachmenturl,'','');
         $msgsent = 1;
     }
     return $msgsent;
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.99 loncom/interface/lonsupportreq.pm:1.100
--- loncom/interface/lonsupportreq.pm:1.99	Mon Aug 12 18:02:25 2019
+++ loncom/interface/lonsupportreq.pm	Tue Jun  9 21:32:32 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Helpdesk request form
 #
-# $Id: lonsupportreq.pm,v 1.99 2019/08/12 18:02:25 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.100 2020/06/09 21:32:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1117,8 +1117,8 @@
     }
 
     # Compose and send a MIME email
-    &Apache::loncommon::mime_email($from, $to, $subject, $supportmsg, $cc_string, $bcc, 
-                                    $attachmentpath, $fname, $attachment_text);
+    &Apache::loncommon::mime_email($from,'',$to,$subject,$supportmsg,$cc_string,
+                                   $bcc,$attachmentpath,$fname,$attachment_text);
 
     if ($attachmentpath =~ m|$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+|) {
         unlink($attachmentpath);




More information about the LON-CAPA-cvs mailing list