Crystal SMTP Library

Docs

A lightweight SMTP client/server library for Crystal.
This library aims to provide simple and reliable SMTP functionality with minimal dependencies.

Status

🏗️ Work in Progress

Installation

  1. Add the dependency to your shard.yml:
dependencies:
  smtp:
    github: alefunion/smtp
  1. Run shards install

Usage

require "smtp"

# Initialize client
client = SMTP::Client.new("email-smtp.us-east-1.amazonaws.com")

begin
  # Authenticate
  client.authenticate("your_username", "your_password")

  # Send email
  client.send_email(
    from: "[email protected]",
    to: "[email protected]",
    subject: "Test Email",
    body: "Hello from Crystal!"
  )
ensure
  client.close
end

Features

SMTP Client

SMTP Server (Coming Soon)