Skip to content

alefunion/smtp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • ✅ SMTP Client - Complete and working
  • 🚧 SMTP Server - Planned, not yet implemented

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

  • TLS support (STARTTLS)
  • Authentication (LOGIN method)
  • Basic email sending functionality
  • Proper SMTP response handling
  • Error handling with custom SMTP::Error class

SMTP Server (Coming Soon)

  • Basic SMTP server implementation
  • TLS support
  • Authentication handlers
  • Message processing hooks
  • Custom routing rules

About

Crystal SMTP Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published