Revision: 7428
http://mahogany.svn.sourceforge.net/mahogany/?rev=7428&view=rev
Author: vadz
Date: 2008-04-24 15:17:55 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
don't expand recipients with FCC: prefix as addresses
Modified Paths:
--------------
trunk/M/src/adb/AdbManager.cpp
Modified: trunk/M/src/adb/AdbManager.cpp
===================================================================
--- trunk/M/src/adb/AdbManager.cpp 2008-04-24 22:05:08 UTC (rev 7427)
+++ trunk/M/src/adb/AdbManager.cpp 2008-04-24 22:17:55 UTC (rev 7428)
@@ -472,28 +472,39 @@
RecipientType rcptType = Recipient_None;
if ( text.length() > 3 )
{
+ size_t prefixLen = 2; // we only use it if rcptType != Recipient_None
+
// check for to:, cc: or bcc: prefix
- if ( text[2u] == ':' )
+ if ( text[prefixLen] == ':' )
{
if ( toupper(text[0u]) == 'T' && toupper(text[1u]) == 'O' )
rcptType = Recipient_To;
else if ( toupper(text[0u]) == 'C' && toupper(text[1u]) == 'C' )
rcptType = Recipient_Cc;
}
- else if ( text[3u] == ':' && text(0, 3).Upper() == _T("BCC") )
+ else if ( text[++prefixLen] == ':' )
{
- rcptType = Recipient_Bcc;
+ const String prefix = text(0, 3).Upper();
+ if ( prefix == "BCC" )
+ rcptType = Recipient_Bcc;
+ else if ( prefix == "FCC" )
+ rcptType = Recipient_Fcc;
}
if ( rcptType != Recipient_None )
{
// erase the prefix (length 2 or 3) with the colon
- text.erase(0, rcptType == Recipient_Bcc ? 4 : 3);
+ text.erase(0, prefixLen + 1);
}
}
- if ( !AdbExpandSingleAddress(&text, subject, profile, win) )
- return Recipient_Max;
+ // folders are not currently expanded (we definitely shouldn't expand them
+ // as addresses)
+ if ( rcptType != Recipient_Fcc )
+ {
+ if ( !AdbExpandSingleAddress(&text, subject, profile, win) )
+ return Recipient_Max;
+ }
*address = text;
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 the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates