Hello All,
Is there a portion of vmime which can open and manipulate a maildir exported via postfix -> procmail? I'm queueing messages this way and am looking to manipulate them with vmime.
Thanks!
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
/* * Get the size of the file */testFile.seekg(0,std::ios::end);std::streamposlength=testFile.tellg();testFile.seekg(0,std::ios::beg);/* * Use a vector as the buffer. * It is exception safe and will be tidied up correctly. * This constructor creates a buffer of the correct length. * * Then read the whole file into the buffer. */std::vector<char>buffer(length);testFile.read(&buffer[0],length);/* * Create your string stream. * Get the stringbuffer from the stream and set the vector as it source. */std::istringstreamlocalStream;localStream.rdbuf()->pubsetbuf(&buffer[0],length);constvmime::stringmsgString=localStream.str();vmime::messageParsermp(msgString);testFile.close();
but am getting compiler errors like:
undefined reference to `vmime::messageParser::messageParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
I think I'm having linker problems... I shifted to an example out of the book and I'm still getting things like:
undefined reference to 'vtable for vmime::utility::stream'
from the compiler... I'm using VisualGDB to develop on Linux in Visual Studio 2015... but the "make" line it sends to the compiler on the linux box looks right...
it sends "-L/var/vmime/build/lib into the compiler (so it should have access to the library from there)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So everything compiles and all that jazz... but the message parser doesn't seem to be reading the email properly. Is there a reference that shows the types of message formats that can be parsed somewhere that I'm missing? My test message is a simple email (containing no mime)... Is this an issue?
Thanks All,
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
VMime parser can parse RFC-(2)822 messages.
Have you an excerpt of what you are trying to parse?
If this is a maildir directory, you can use VMime maildir store (have a look at the book or at the samples). If this is a mailbox file (a file which contains a lot of RFC-822 messages), VMime cannot parse it out-of-the-box: you should first delimit and extract each message, then you can parse each one with VMime separately.
Vincent
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello All,
Is there a portion of vmime which can open and manipulate a maildir exported via postfix -> procmail? I'm queueing messages this way and am looking to manipulate them with vmime.
Thanks!
Chris
I've currently tried this:
but am getting compiler errors like:
I've included:
and am able to reference it without Intellisense complaiing...
I think I'm having linker problems... I shifted to an example out of the book and I'm still getting things like:
from the compiler... I'm using VisualGDB to develop on Linux in Visual Studio 2015... but the "make" line it sends to the compiler on the linux box looks right...
it sends "-L/var/vmime/build/lib into the compiler (so it should have access to the library from there)
yep... i'm an idiot...
So everything compiles and all that jazz... but the message parser doesn't seem to be reading the email properly. Is there a reference that shows the types of message formats that can be parsed somewhere that I'm missing? My test message is a simple email (containing no mime)... Is this an issue?
Thanks All,
Chris
Specifically, the To() function results in a dump of the app when I call it...
Hello!
VMime parser can parse RFC-(2)822 messages.
Have you an excerpt of what you are trying to parse?
If this is a maildir directory, you can use VMime maildir store (have a look at the book or at the samples). If this is a mailbox file (a file which contains a lot of RFC-822 messages), VMime cannot parse it out-of-the-box: you should first delimit and extract each message, then you can parse each one with VMime separately.
Vincent