An extensible Erlang library for building SMTP clients and servers with support for authentication, TLS, and MIME encoding.
gen_smtp is a generic Erlang library for implementing SMTP client and server functionality within Erlang applications. It provides a flexible, OTP-style framework for sending and receiving email, including support for authentication, encryption, and MIME handling, enabling developers to build custom mail servers or integrate email capabilities into larger systems.
Erlang developers building applications that require email sending, receiving, or custom mail server functionality, such as web frameworks, email forwarding services, or contact tracing systems.
Developers choose gen_smtp for its pure Erlang implementation, extensible OTP-style architecture, and comprehensive feature set including DKIM signing, IPv6 support, and LMTP protocol compatibility, avoiding the complexity of POP/IMAP while providing a robust foundation for mail-related applications.
The extensible Erlang SMTP client and server library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows building custom SMTP servers through callback modules, enabling integration in frameworks like Zotonic and Chicago Boss, as highlighted in the README's usage examples.
Supports authentication (PLAIN, LOGIN, CRAM-MD5), TLS/SSL, IPv6, and LMTP protocol, making it versatile for various email scenarios, including DKIM signing with RSA or Ed25519.
Includes a RFC-compliant MIME encoder/decoder for handling attachments and multipart messages, simplifying email content management without external libraries.
Used in production by services like Gmailbox and hookup.email, with the README noting it handles over 100,000 emails without memory leaks or crashes.
Requires an eiconv module for text encoding/decoding, adding an extra dependency that must be managed separately and potentially complicating setup.
Leveraging its extensible framework demands deep knowledge of Erlang/OTP patterns and callback modules, which can be a barrier for developers new to the ecosystem.
Excludes IMAP and POP3, meaning it's unsuitable for building full-featured email clients that need to retrieve emails, as admitted in the mission statement.
Numerous options for client and server setup, such as session options and TLS settings, can be overwhelming for simple use cases and increase the risk of misconfiguration.