Before you try to compile it, you have to know that packages exist for some systems.
you can find it in ports/mail/libetpan. This is currently 0.32 for -stable and -current.
you can find it in packages of PowerPack 10. This is currently 0.32.