I just uploaded ERlMail-0.0.3 into the downloads section of the website. This release handles a few very minor bug fixes and adds a basic SMTP server Finite State Machine. I’m not 100% happy with the socket implementation into the SMTP Server, so be aware that it could be unstable.
I also added the SORT command into the IMAP client, some basic functions into a maildir modules and an RFC822 scanner/parser to handle parsing dates.
In the next release, I’m planning on implementing some functions for a mail store that will be able to be used for multiple types of storage. The initial storage engine will be a maildir file storage, but the store modules will able able to be used to access the mail in both a read and write scenario, making it useful for the SMTP server as well as the IMAP4 and POP3 servers.
EIF, Erlang, SMTP, ErlMail







I needed smtp for my Erlang program, I tried epop, smtp_client and looked through yaws mail example. All they have the same problem - they get domain (passed to HELO) from the hostname and on my windows machine this could not be done. But you code works. But it seems a bit strange to me that I need 6 files just to send an smtp message (the most surprising was imap.hrl)
I’ve been writing my SMTP and IMAP client / server modules at the same time and I might have some code that crosses between them that could be removed. I’ll look into that when I get back into them.
I also have a lot of the code broken out into different modules to allow for more flexibility. In the long run I always write a function that handles the SMTP command then way I want to deal with them in the specific application, but having them broken out into different files lets me choose how to organize the commands in any way I see fit. It does create some redundancy, but I’m willing to live with that for the benefits that I see in it.
Otherwise I’m thrilled to hear that you got the SMTP client working for you. Makes me happy to know that my little code is solving problems for other people.