diff options
Diffstat (limited to 'common/mailpreprocessor.cpp')
-rw-r--r-- | common/mailpreprocessor.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/common/mailpreprocessor.cpp b/common/mailpreprocessor.cpp index 58cb15b..9efa5c9 100644 --- a/common/mailpreprocessor.cpp +++ b/common/mailpreprocessor.cpp | |||
@@ -133,10 +133,21 @@ void MailPropertyExtractor::updatedIndexedProperties(Sink::ApplicationDomain::Ma | |||
133 | } else { | 133 | } else { |
134 | contentToIndex << processPart(msg.data()); | 134 | contentToIndex << processPart(msg.data()); |
135 | } | 135 | } |
136 | contentToIndex.append({{}, msg->from(true)->asUnicodeString()}); | 136 | const auto sender = mail.getSender(); |
137 | contentToIndex.append({{}, msg->to(true)->asUnicodeString()}); | 137 | contentToIndex.append({{}, sender.name}); |
138 | contentToIndex.append({{}, msg->cc(true)->asUnicodeString()}); | 138 | contentToIndex.append({{}, sender.emailAddress}); |
139 | contentToIndex.append({{}, msg->bcc(true)->asUnicodeString()}); | 139 | for (const auto &c : mail.getTo()) { |
140 | contentToIndex.append({{}, c.name}); | ||
141 | contentToIndex.append({{}, c.emailAddress}); | ||
142 | } | ||
143 | for (const auto &c : mail.getCc()) { | ||
144 | contentToIndex.append({{}, c.name}); | ||
145 | contentToIndex.append({{}, c.emailAddress}); | ||
146 | } | ||
147 | for (const auto &c : mail.getBcc()) { | ||
148 | contentToIndex.append({{}, c.name}); | ||
149 | contentToIndex.append({{}, c.emailAddress}); | ||
150 | } | ||
140 | 151 | ||
141 | //Prepare content for indexing; | 152 | //Prepare content for indexing; |
142 | mail.setProperty("index", QVariant::fromValue(contentToIndex)); | 153 | mail.setProperty("index", QVariant::fromValue(contentToIndex)); |