Revision: 7343
          http://mahogany.svn.sourceforge.net/mahogany/?rev=7343&view=rev
Author:   vadz
Date:     2007-08-26 05:07:41 -0700 (Sun, 26 Aug 2007)

Log Message:
-----------
decode sender addresses too, not only subjects, in the progress messages; also 
indicate multiple senders if any

Modified Paths:
--------------
    trunk/M/src/modules/Filters.cpp

Modified: trunk/M/src/modules/Filters.cpp
===================================================================
--- trunk/M/src/modules/Filters.cpp     2007-08-26 11:39:26 UTC (rev 7342)
+++ trunk/M/src/modules/Filters.cpp     2007-08-26 12:07:41 UTC (rev 7343)
@@ -2888,9 +2888,11 @@
 
 void FilterRuleApply::GetSenderSubject(String& from, String& subject, bool 
full)
 {
-   subject = MIME::DecodeHeader(m_parent->m_MailMessage->Subject());
+   Message * const msg = m_parent->m_MailMessage;
 
-   AddressList_obj addrList(m_parent->m_MailMessage->GetAddressList(MAT_FROM));
+   subject = MIME::DecodeHeader(msg->Subject());
+
+   AddressList_obj addrList(msg->GetAddressList(MAT_FROM));
    Address *addr = addrList ? addrList->GetFirst() : NULL;
    if ( addr )
    {
@@ -2905,6 +2907,15 @@
          if ( from.empty() )
             from << _T('<') << addr->GetEMail() << _T('>');
       }
+
+      from = MIME::DecodeHeader(from);
+
+      if ( addrList->HasNext(addr) )
+      {
+         // indicate that there is more than one message sender (untypical but
+         // apparently possible)
+         from += _(", ...");
+      }
    }
    else // no valid sender address
    {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to