Author Topic: Use of reply-to field in identity for message replies  (Read 2382 times)

Offline jefke

  • Newbie
  • *
  • Posts: 2
Use of reply-to field in identity for message replies
« on: May 03, 2007, 03:41:38 AM »
Hello,

This patch for the SVN version of roundcube also checks the "reply-to" address when replying to emails. I.e. when the original email was send to an identity for which the reply-to matches, that identity is selected.

A similar patch can be applied on the stable release, with a few modifications regarding the html_signature.

Code: [Select]
Index: program/steps/mail/compose.inc
===================================================================
--- program/steps/mail/compose.inc   (revision 550)
+++ program/steps/mail/compose.inc   (working copy)
@@ -265,7 +265,7 @@
   }

  // get this user's identities
- $sql_result = $DB->query("SELECT identity_id, name, email, signature, html_signature
+ $sql_result = $DB->query("SELECT identity_id, name, email, signature, html_signature, `reply-to`
               FROM  ".get_table_name('identities')."
               WHERE user_id=?
               AND  del<>1
@@ -299,6 +299,9 @@
     }

    // set identity if it's one of the reply-message recipients
+   if (in_array($sql_arr['reply-to'], $a_recipients))
+     $from_id = $sql_arr['identity_id'];
+
    if (in_array($sql_arr['email'], $a_recipients))
     $from_id = $sql_arr['identity_id'];