DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: N.A.N.Y. 2019: libvldmail: Your friendly e-mail address validation library.  (Read 13,034 times)

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Just throwing together my other 2019 applications before writing new ones...

NANY 2019 Entry Information

Application Name libvldmail
Version 0.1.1
Short Description A library that can validate e-mail addresses according to RFC 6531 with a fallback to RFC 5321 ff.
Supported OSes Any, I hope.
Web Page https://www.donationcoder.com/forum/index.php?topic=45118
Download Link None, actually. This is a library, it needs to be integrated with your own applications...
System Requirements
  • You will need a C compiler. Nothing else.
Version History0.1.1 [2018-02-25]:
- Introducing the BREAK_LOOP_FAIL macro. (Thank you, stsc.)
- Improved output of one of the validation messages.

0.1.0 [2018-02-24]:
- Initial version.
Author when in doubt, me

Description
Your friendly e-mail address validation library.

Features
- Can validate e-mail addresses.
- Comes with a test

Screenshots
;D

Usage
Using the Application

You can use libvldmail from inside your own applications. :)
Example code (C):

Code
    #include <vldmail.h>
    
    int main(void) {
        /* ... your code ... */
        
        vldmail validator = validate_email(L"foo@bar.quux");
        if (0 == validator.success) {
            /* success == 0 means that something was wrong. */
            printf(L"Validating foo@bar.quux failed: %ls\n", validator.message);
        }
        
        /* ... more of your code ... */
    }

Uninstallation
Just remove it, I guess.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • Participated in NANY Challenge Four Times
    • Coding Snacks
Code
    #include <vldmail.h>
    
    int main(void) {
        /* ... your code ... */
        
        vldmail validator = validate_email(L"foo@bar.quux");
        if (0 == validator.success) {
            /* success == 0 means that something was wrong. */
            printf(L"Validating foo@bar.quux failed: %ls\n", validator.message);
        }
        
        /* ... more of your code ... */
    }
Does your library perform online check to see if its valid or how does it work?

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
No, it is a complete offline implementation of the RFCs. :) It basically parses the string according to given rules.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • Participated in NANY Challenge Four Times
    • Coding Snacks
Will you later integrate at least a "does domain exists" function or will it never evolve to such?
Thank you for answering Mr. Tuxman.

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
That would not make sense as the RFCs don't require the "domain" part to be a registered and reachable domain. Additionally, the application which uses the library does not have to access the internet at all.

There are libraries for that.  :up:
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • Participated in NANY Challenge Four Times
    • Coding Snacks
There are libraries for that.
Okay, thank you again for answering. :Thmbsup:

Original address: https://www.donationcoder.com/forum/index.php?topic=45924.0