Respect address book when getting from address
authorJamie Cameron <jcameron@webmin.com>
Thu, 31 Jan 2008 21:56:01 +0000 (21:56 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 31 Jan 2008 21:56:01 +0000 (21:56 +0000)
filter/CHANGELOG
filter/save.cgi
filter/save_auto.cgi

index 0a8b01a..ec8fd37 100644 (file)
@@ -12,3 +12,5 @@ Added a simple page for setting up forwarding.
 ---- Changes since 1.290 ----
 Added a Module Config option to create a .forward file automatically that runs procmail, for systems that don't have procmail delivery globally enabled.
 Added Module Config options to set the minimum allowed time between autoreplies, and to force use of that minimum.
+---- Changes since 1.320 ----
+The default From: address for autoreplies now respects the default address set in the user's address book.
index cfe3998..885cd36 100755 (executable)
@@ -116,8 +116,8 @@ else {
                $in{'reply'} =~ /\S/ || &error($text{'save_ereply'});
                $in{'reply'} =~ s/\r//g;
                $filter->{'reply'}->{'autotext'} = $in{'reply'};
-               ($froms, $doms) = &mailbox::list_from_addresses();
-               $filter->{'reply'}->{'from'} = $froms->[0];
+               $filter->{'reply'}->{'from'} =
+                       &mailbox::get_preferred_from_address();
                $idx = defined($filter->{'index'}) ? $filter->{'index'}
                                                   : scalar(@filters);
                $filter->{'reply'}->{'autoreply'} ||=
index a908dd6..db66174 100644 (file)
@@ -27,8 +27,7 @@ elsif ($in{'enabled'}) {
        $filter->{'reply'}->{'autotext'} = $in{'reply'};
 
        # From address (automatic)
-       ($froms, $doms) = &mailbox::list_from_addresses();
-       $filter->{'reply'}->{'from'} = $froms->[0];
+       $filter->{'reply'}->{'from'} = &mailbox::get_preferred_from_address();
 
        # File
        $idx = defined($filter->{'index'}) ? $filter->{'index'}