XUtils

libvldmail

Your friendly e-mail address validation library. [`WTFPLv2`](http://www.wtfpl.net/txt/copying/)


build libvldmail

Your friendly e-mail address validation library.

Why?

  • Did you know that parentheses, spaces and - according to the RFC 6531 document - emojis can be a part of a valid e-mail address?
  • Did you know that both IPv6 addresses and resources in your intranet are valid parts of the part after the “@”, so requiring a TLD (xxxx.yy) is entirely wrong?

Nor do all of the existing (and more complex than “is there an @ character?”) validators I’ve come across. So this is my approach.

A note on deprecation inside the RFCs

Things change. E-mail addresses do not necessarily have to. By default, valid e-mail addresses are recognized as valid even if the standards say that you should not use them anymore. If you compile libvldmail with the STRICT_VALIDATION preprocessor parameter, however, the library will mark more “deprecated” addresses as invalid.

Portability

You should be able to use libvldmail from inside Ruby, Python. Lisp etc. with the included SWIG template file (contrib/libvldmail.i).

Building

Use CMake to create the libvldmail library, then link it into your application. And don’t forget to point to the vldmail.h header.

Building the test file as well

By default, CMake does not build test.c which tries to test the library’s basic functions. If you want to test libvldmail using it, please just pass the parameter BUILD_THE_TEST to CMake:

cmake . -DBUILD_THE_TEST=1

Versioning

libvldmail tries to follow the Semantic Versioning scheme. You can ask for the current version via the API:

printf("libvldmail version %d", VLDMAIL_VERSION);

We use simple mathematics here:

const int VLDMAIL_VERSION = 1;     // Version 0.0.1  (0 * 10^4 +  0 * 10^2 + 1 * 10^0)
const int VLDMAIL_VERSION = 21209; // Version 2.12.9 (2 * 10^4 + 12 * 10^2 + 9 * 10^0)

This should be enough.

Help me, please?

I accept pull requests if they are related to adding RFC-compatibility. This library seems to be working as intended, but - just like every other software - there might be quirks which I have not come across yet. You are invited to list yourself as a contributor below this paragraph if you need your merits:

Contributors

  • None, yet.

Articles

  • coming soon...