summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emailhandler.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mailit/emailhandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index 03f8a28..f6c6d60 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -200,13 +200,19 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
200 } 200 }
201 201
202 //@@@ToDo: Rewrite the parser as To: stops at the first occurence- which is Delivered-To: 202 //@@@ToDo: Rewrite the parser as To: stops at the first occurence- which is Delivered-To:
203 if (pos = p.find("TO",':', pos, TRUE) != -1) 203 if ((pos = p.find("TO",':', 0, TRUE)) != -1)
204 { 204 {
205 pos++; 205 pos++;
206 mail->recipients.append (p.getString(&pos, 'z', TRUE) ); 206 mail->recipients.append (p.getString(&pos, 'z', TRUE) );
207 } 207 }
208 208
209 209 //@@@ToDo: Rewrite the parser as To: stops at the first occurence- which is Delivered-To:
210 if ((pos = p.find("CC",':', 0, TRUE)) != -1)
211 {
212 pos++;
213 mail->carbonCopies.append (p.getString(&pos, 'z', TRUE) );
214 }
215
210 216
211 if ((pos = p.find("SUBJECT",':', 0, TRUE)) != -1) { 217 if ((pos = p.find("SUBJECT",':', 0, TRUE)) != -1) {
212 pos++; 218 pos++;
@@ -434,6 +440,13 @@ int EmailHandler::encodeMime(Email *mail)
434 for (QStringList::Iterator it = mail->recipients.begin(); it != mail->recipients.end(); ++it ) { 440 for (QStringList::Iterator it = mail->recipients.begin(); it != mail->recipients.end(); ++it ) {
435 newBody += *it + " "; 441 newBody += *it + " ";
436 } 442 }
443
444 newBody += "\r\nCC: ";
445
446 for (QStringList::Iterator it = mail->carbonCopies.begin(); it != mail->carbonCopies.end(); ++it ) {
447 newBody += *it + " ";
448 }
449
437 newBody += "\r\nSubject: " + mail->subject + "\r\n"; 450 newBody += "\r\nSubject: " + mail->subject + "\r\n";
438 451
439 if (mail->files.count() == 0) { //just a simple mail 452 if (mail->files.count() == 0) { //just a simple mail