FAQ

Following are Frequently Asked Questions about VMime:

Can I build VMime on platform X?

Probably. Actually, you can build VMime on almost every platform that support C++ and ‘iconv’ library. The C++ compiler should be enough recent to support templates, RTTI and the STL.

However, you will have to write your own platform handler as the default platform handler that comes with the distribution only works for POSIX-compliant platforms (for now). It’s not very difficult, just look at the files in the src/platforms/posix directory. If you write a handler for your platform, please contribute to VMime code!

Update (2005/03/28): a platform handler for Windows is now available in VMime (thanks to Stefan Uhrig).

Do you provide binaries for platform X?

Unfortunately, we do not provide any binary, neither for Linux nor for Windows or for any platform.

Maintaining up-to-date binaries (and ensuring they work on the numerous platforms) is lot of work, and we prefer taking time to work on the library instead of dealing with binaries.

How to compile VMime from SVN?

If you want to go the easy way, don’t bother with SVN; you should get a tarball of the project, it will compile out-of-the-box (simply follow the guidelines in the VMime Book).

First, you have to check out VMime’s SVN repository with the following instruction set.

   svn co https://vmime.svn.sourceforge.net/svnroot/vmime/trunk vmime

We are going to compile VMime using autotools (configure, make).
As the Makefiles are not stored in the SVN, we need to generate them:

   scons sendmail_path=foo autotools

(Note: sendmail_path is not used when using autotools, the value does not matter, but it must be specified on the command line).

Then, compile VMime the classical way:

   ./configure
./make

If you want to install the libs and the header files on your system, become root
and type:

   make install

Why GPL and not LGPL?

Yes, VMime is licensed under the GNU GPL license.

So, why I have not chosen LGPL license? Because VMime is Free Software, and in my opinion, the LGPL is not enough Free (I mean, from the end user’s point of view). LGPL does not help to promote Free Software as it permits to create proprietary programs based on Free libraries.

However, if you absolutely need to use VMime in your proprietary program, check out our Dual Licensing.

Is VMime thread-safe?

VMime is thread-safe in the sense you can have multiple threads running VMime code at the same time.

What you can NOT do is to share VMime objects (for writing) between threads. For example, you should NOT modify the same bodyPart object from two threads at the same time (reading is OK) unless you write your own synchronization mechanism between the calls.

If you are using the messaging module, it is OK to access multiple mailboxes (store objects) from multiple threads (each thread accesses one mailbox).

The rest of the code (parser, utils, etc.) is thread-safe as long as (again…) you don’t share the objects (body parts, mailboxes, etc.) between multiple threads.

There are some singleton objects in VMime. There is absolutely no problem when instanciating a VMime singleton for the first time within multi-threaded code. Instanciation of all singletons is forced when VMime is initialized (static code, executed before your main()).

I called deleteMessage() to delete a message from a store, but the message is not actually deleted!

Call folder->close(true) to expunge messages marked as deleted.

How many projects use VMime?

Currently, the following projects are known to use VMime:

If your project makes use of VMime and you want it to be listed here, please contact me.

I have found a bug in VMime. What should I do?

First, please ensure that your bug is not already listed in the bug request manager. Then, if your bug does not exist, then open a new bug report and provide as much information as possible (OS version, VMime version, minimal example code, steps to reproduce…). We will try to have a look at it as soon as possible.

I have made a patch for VMime. May I send it to you?

Sure! You are encouraged to contribute to VMime source code, this is a basic in Open Source development.

Please ensure your patch is well tested and does not break other parts in the library (you can run the unit tests of the distribution, and write your own tests). Then, you can publish your patch in the Patch tracker
or send us an email.

Also, be sure to read the VMime coding guidelines to know more about coding conventions and code quality.

13 thoughts on “FAQ

  1. Hi Sir,
    I found that
    gnutls_certificate_type_set_priority always return -1250 “GNUTLS_E_UNIMPLEMENTED_FEATURE”

    since pop3s ,imaps can not be used .

    my platform window7 .
    regards,
    Tom

  2. Hi,
    I’d like to know if vmime already has the ability of generating a local cache.
    Or it is something to do manually?

    Thanks

    • Hello Marco!

      For now, you have to do it manually.
      I have some plans to implement directly in VMime a local cache system for IMAP, that may rely on mailbox/maildir.

      Vincent

  3. Hi!

    I am having trouble creating a static vmime library .a on my platform (OSX Lion). Any suggestions? Thanks a lot!

    • Hello,

      Did you try to build VMime using SCons?
      Install SConstruct on your system, then type “scons” in the root directory of VMime. This will build a static library by default.

      Vincent

  4. Hi,
    I try to load your library dynamically and I receive the following error:
    Cannot load libvmime.so into server: undefined symbol: _ZN5vmime5_CRLFE
    Where is this symbol defined?

    Thanks,
    Evgeny

  5. Hi!

    Would it be possible to use OpenSSL instead of GNUTls for SSL/TLS in VMime?

    Cheers,
    Mehmet

    • Hello!

      For now, VMime only support Gnu TLS.

      It would be possible (and quite easy) to support OpenSSL by rewriting the classes in “src/net/tls/” (TLSSession, TLSSocket…).
      If you want to write it, please send a patch so that I can add it to VMime.

      Vincent

  6. Hi,

    I am interested in using mime commercially for a mac application but, to be honest, I am not familiar with c++.

    Do you have a pre-built version of mime and, maybe, one or more samples to get started?

    Another question: I need to read and add custom headers to received and sent messages and sync these headers with the imap server. Is this possible?

    Thanks,

    Marcel

    • Hello!

      There is not pre-built binary version for VMime.

      However, there is sample code provided in the VMime package.
      Also have a look at the documentation here: http://www.vmime.org/documentation.html

      As for your question: yes, VMime is capable of adding/removing/modifying header to a MIME message.

      Vincent