All Projects → lettre → Lettre

lettre / Lettre

Licence: mit
a mailer library for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Lettre

email
Aplus Framework Email Library
Stars: ✭ 127 (-82.19%)
Mutual labels:  email, mailer, smtp
Magento 2 Smtp
Magento 2 SMTP Extension helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers.
Stars: ✭ 228 (-68.02%)
Mutual labels:  email, smtp, mailer
Mailer
A lightweight PHP SMTP mail sender
Stars: ✭ 53 (-92.57%)
Mutual labels:  email, smtp, mailer
mail
Actively maintained fork of gomail. The best way to send emails in Go.
Stars: ✭ 376 (-47.27%)
Mutual labels:  email, mailer, smtp
yggmail
End-to-end encrypted email for the mesh networking age
Stars: ✭ 72 (-89.9%)
Mutual labels:  email, smtp
go-html-email
Sending HTML email using Go 💌
Stars: ✭ 31 (-95.65%)
Mutual labels:  email, smtp
ESP-Mail-Client
⚡️Arduino Mail Client Library to send, read and get incoming mail notification for ESP32, ESP8266 and SAMD21 devices. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.
Stars: ✭ 78 (-89.06%)
Mutual labels:  email, smtp
Phpmailer
The classic email sending library for PHP
Stars: ✭ 17,485 (+2352.31%)
Mutual labels:  email, smtp
DANE-for-SMTP
'DANE for SMTP' wiki
Stars: ✭ 28 (-96.07%)
Mutual labels:  email, smtp
Notqmail
Collaborative open-source successor to qmail
Stars: ✭ 255 (-64.24%)
Mutual labels:  email, smtp
Deltachat Core Rust
Delta Chat Rust Core library, used by Android/iOS/desktop apps and bindings
Stars: ✭ 300 (-57.92%)
Mutual labels:  email, smtp
Mailer
The Mailer component helps sending emails
Stars: ✭ 609 (-14.59%)
Mutual labels:  email, mailer
mailx
A lightweight SMTP mail library
Stars: ✭ 17 (-97.62%)
Mutual labels:  email, smtp
tmail
A throwaway smtp server with API
Stars: ✭ 13 (-98.18%)
Mutual labels:  email, smtp
go-simple-mail
Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP.
Stars: ✭ 298 (-58.2%)
Mutual labels:  email, smtp
Magento2 Gmail Smtp App
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers
Stars: ✭ 281 (-60.59%)
Mutual labels:  email, smtp
Mailkit
A cross-platform .NET library for IMAP, POP3, and SMTP.
Stars: ✭ 4,477 (+527.91%)
Mutual labels:  email, smtp
Blastula
Easily send great-looking HTML email messages from R
Stars: ✭ 394 (-44.74%)
Mutual labels:  email, smtp
Salmon
A Python Mail Server
Stars: ✭ 482 (-32.4%)
Mutual labels:  email, smtp
Deltachat Desktop
Email-based instant messaging for Desktop.
Stars: ✭ 526 (-26.23%)
Mutual labels:  email, smtp

lettre

A mailer library for Rust


NOTE: this readme refers to the 0.10 version of lettre, which is still being worked on. The master branch and the alpha releases will see API breaking changes and some features may be missing or incomplete until the stable 0.10.0 release is out. Use the v0.9.x branch for stable releases.


Features

Lettre provides the following features:

  • Multiple transport methods
  • Unicode support (for email content and addresses)
  • Secure delivery with SMTP using encryption and authentication
  • Easy email builders
  • Async support

Lettre does not provide (for now):

  • Email parsing

Example

This library requires Rust 1.45 or newer. To use this library, add the following to your Cargo.toml:

[dependencies]
lettre = "0.10.0-beta.3"
use lettre::transport::smtp::authentication::Credentials;
use lettre::{Message, SmtpTransport, Transport};

let email = Message::builder()
    .from("NoBody <[email protected]>".parse().unwrap())
    .reply_to("Yuin <[email protected]>".parse().unwrap())
    .to("Hei <[email protected]>".parse().unwrap())
    .subject("Happy new year")
    .body("Be happy!")
    .unwrap();

let creds = Credentials::new("smtp_username".to_string(), "smtp_password".to_string());

// Open a remote connection to gmail
let mailer = SmtpTransport::relay("smtp.gmail.com")
    .unwrap()
    .credentials(creds)
    .build();

// Send the email
match mailer.send(&email) {
    Ok(_) => println!("Email sent successfully!"),
    Err(e) => panic!("Could not send email: {:?}", e),
}

Testing

The lettre tests require an open mail server listening locally on port 2525 and the sendmail command.

Alternatively only unit tests can be run by doing cargo test --lib.

Code of conduct

Anyone who interacts with Lettre in any space, including but not limited to this GitHub repository, must follow our code of conduct.

License

This program is distributed under the terms of the MIT license.

The builder comes from emailmessage-rs by Kayo, under MIT license.

See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].