Index: openacs-4/packages/bulk-mail/bulk-mail.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/bulk-mail.info,v
diff -u -r1.19.2.1 -r1.19.2.2
--- openacs-4/packages/bulk-mail/bulk-mail.info	30 Jul 2020 16:36:23 -0000	1.19.2.1
+++ openacs-4/packages/bulk-mail/bulk-mail.info	10 Feb 2021 13:36:55 -0000	1.19.2.2
@@ -7,7 +7,7 @@
     <initial-install-p>f</initial-install-p>
     <singleton-p>f</singleton-p>
     
-    <version name="2.10.0d2" url="http://openacs.org/repository/download/apm/bulk-mail-2.10.0d2.apm">
+    <version name="2.10.0d3" url="http://openacs.org/repository/download/apm/bulk-mail-2.10.0d3.apm">
         <owner url="http://openacs.org">OpenACS</owner>
         <release-date>2017-08-06</release-date>
         <vendor url="http://dotlrn.org">DotLRN Consortium</vendor>
@@ -16,7 +16,7 @@
         <description format="text/html">Provides an API for sending messages to a collection of users (which can be chosen via arbitrary sql).  Mails can be personalized and can be scheduled for a later date.</description>
 
 
-        <provides url="bulk-mail" version="2.10.0d2"/>
+        <provides url="bulk-mail" version="2.10.0d3"/>
         <requires url="acs-mail-lite" version="5.9.1"/>
 
         <callbacks>
Index: openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-create.sql,v
diff -u -r1.4.2.1 -r1.4.2.2
--- openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-create.sql	30 Jul 2020 16:36:23 -0000	1.4.2.1
+++ openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-create.sql	10 Feb 2021 13:36:55 -0000	1.4.2.2
@@ -30,6 +30,7 @@
     query                       clob
                                 constraint bm_messages_query_nn
                                 not null,
+    to_display_name             text,
     status                      varchar2(100)
                                 default 'pending'
                                 constraint bm_messages_status_ck
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bulk-mail/sql/oracle/upgrade/upgrade-2.10.0d2-2.10.0d3.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql,v
diff -u -r1.6.2.1 -r1.6.2.2
--- openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql	30 Jul 2020 16:36:23 -0000	1.6.2.1
+++ openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql	10 Feb 2021 13:36:55 -0000	1.6.2.2
@@ -36,6 +36,7 @@
     query                       text
                                 constraint bm_messages_query_nn
                                 not null,
+    to_display_name             text,
     status                      varchar(100)
                                 default 'pending'
                                 constraint bm_messages_status_ck
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bulk-mail/sql/postgresql/upgrade/upgrade-2.10.0d2-2.10.0d3.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl,v
diff -u -r1.18.2.2 -r1.18.2.3
--- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl	10 Feb 2021 11:50:16 -0000	1.18.2.2
+++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl	10 Feb 2021 13:36:55 -0000	1.18.2.3
@@ -86,6 +86,7 @@
         {-message:required}
         {-message_type ""}
         {-query:required}
+        {-to_display_name ""}
     } {
         create a new bulk_mail message
 
@@ -119,6 +120,11 @@
                      respective values will also become the 'from_addr',
                      'reply_to', 'subject', and 'message' on a per recipient
                      basis.
+        @param to_display_name Display name set for the recipient in
+                               the To: email header, useful to qualify
+                               the individual recipient as e.g. member
+                               of the group of people who have
+                               received the bulk_mail message.
 
         @return bulk_mail_id the id of the newly created bulk_mail message
     } {
@@ -169,7 +175,8 @@
              reply_to,
              extra_headers,
              message,
-             query
+             query,
+             to_display_name
              )
             values
             (
@@ -183,7 +190,8 @@
              :reply_to,
              :extra_headers,
              :message,
-             :query
+             :query,
+             :to_display_name
              )
         }
 
@@ -290,9 +298,18 @@
                     set mime_type "text/plain"
                 }
 
+                set to_addr [ns_set get $recipient email]
+                set to_display_name [ns_set get $bulk_mail to_display_name]
+                if {$to_display_name ne ""} {
+                    # If a display name has been specified, include it in
+                    # the recipient address.
+                    regsub -all "\"" $to_display_name "\\\"" to_display_name
+                    set to_addr [subst -nocommands {"${to_display_name}" <${to_addr}>}]
+                }
+
                 # both html and plain messages can now be sent the same way
                 acs_mail_lite::send \
-                    -to_addr [ns_set get $recipient email] \
+                    -to_addr $to_addr \
                     -from_addr $from_addr \
                     -subject $subject \
                     -body $message \