aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/rfc822
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/rfc822')
-rw-r--r--src/core/rfc822/MCAttachment.cc1
-rw-r--r--src/core/rfc822/MCMessageParser.cc8
-rw-r--r--src/core/rfc822/MCMessageParser.h1
3 files changed, 7 insertions, 3 deletions
diff --git a/src/core/rfc822/MCAttachment.cc b/src/core/rfc822/MCAttachment.cc
index 0874d300..c75e689a 100644
--- a/src/core/rfc822/MCAttachment.cc
+++ b/src/core/rfc822/MCAttachment.cc
@@ -482,7 +482,6 @@ Attachment * Attachment::attachmentWithSingleMIME(struct mailmime * mime)
content_id = single_fields.fld_id;
loc = single_fields.fld_location;
- MCLog("filename %s", filename);
if (filename != NULL) {
result->setFilename(String::stringByDecodingMIMEHeaderValue(filename));
}
diff --git a/src/core/rfc822/MCMessageParser.cc b/src/core/rfc822/MCMessageParser.cc
index 335ff43f..98982e93 100644
--- a/src/core/rfc822/MCMessageParser.cc
+++ b/src/core/rfc822/MCMessageParser.cc
@@ -14,6 +14,12 @@ MessageParser * MessageParser::messageParserWithData(Data * data)
return (MessageParser *) parser->autorelease();
}
+MessageParser * MessageParser::messageParserWithContentsOfFile(String * filename)
+{
+ Data * data = Data::dataWithContentsOfFile(filename);
+ return messageParserWithData(data);
+}
+
void MessageParser::init()
{
mData = NULL;
@@ -31,8 +37,6 @@ MessageParser::MessageParser(Data * data)
msg = data_message_init(data->bytes(), data->length());
mailmessage_get_bodystructure(msg, &mime);
mMainPart = (AbstractPart *) Attachment::attachmentsWithMIME(msg->msg_mime)->retain();
- MCLog("%s:%p ", MCUTF8(mMainPart->className()), mMainPart);
- MCLog("%s:%p ", MCUTF8(mMainPart->description()), mMainPart);
mMainPart->setMessage(this);
header()->importIMFFields(msg->msg_fields);
mailmessage_free(msg);
diff --git a/src/core/rfc822/MCMessageParser.h b/src/core/rfc822/MCMessageParser.h
index f5d043c5..4f13299d 100644
--- a/src/core/rfc822/MCMessageParser.h
+++ b/src/core/rfc822/MCMessageParser.h
@@ -15,6 +15,7 @@ namespace mailcore {
class MessageParser : public AbstractMessage {
public:
static MessageParser * messageParserWithData(Data * data);
+ static MessageParser * messageParserWithContentsOfFile(String * filename);
MessageParser(Data * data);
virtual ~MessageParser();