From 8b85cba50912127ff6a2d048021baf68306481c6 Mon Sep 17 00:00:00 2001 From: groucho Date: Sun, 20 Apr 2003 07:59:48 +0000 Subject: - Added CC: support - Added mail forwarding - Added icon for selective mail download - Removing mails from mail list via icon - Temporarily disabled mail header download queue --- (limited to 'noncore/unsupported/mailit/emailhandler.cpp') 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) } //@@@ToDo: Rewrite the parser as To: stops at the first occurence- which is Delivered-To: - if (pos = p.find("TO",':', pos, TRUE) != -1) + if ((pos = p.find("TO",':', 0, TRUE)) != -1) { pos++; mail->recipients.append (p.getString(&pos, 'z', TRUE) ); } - + //@@@ToDo: Rewrite the parser as To: stops at the first occurence- which is Delivered-To: + if ((pos = p.find("CC",':', 0, TRUE)) != -1) + { + pos++; + mail->carbonCopies.append (p.getString(&pos, 'z', TRUE) ); + } + if ((pos = p.find("SUBJECT",':', 0, TRUE)) != -1) { pos++; @@ -434,6 +440,13 @@ int EmailHandler::encodeMime(Email *mail) for (QStringList::Iterator it = mail->recipients.begin(); it != mail->recipients.end(); ++it ) { newBody += *it + " "; } + + newBody += "\r\nCC: "; + + for (QStringList::Iterator it = mail->carbonCopies.begin(); it != mail->carbonCopies.end(); ++it ) { + newBody += *it + " "; + } + newBody += "\r\nSubject: " + mail->subject + "\r\n"; if (mail->files.count() == 0) { //just a simple mail -- cgit v0.9.0.2