ohmysmtp

Crates.ioohmysmtp
lib.rsohmysmtp
version0.1.1
sourcesrc
created_at2021-12-09 23:14:21.942163
updated_at2021-12-12 19:57:39.612508
descriptionAn OhMySMTP client
homepage
repositoryhttps://github.com/sigaloid/ohmysmtp/
max_upload_size
id495441
size19,183
Matthew Esposito (sigaloid)

documentation

README

OhMySMTP - Rust client

Documentation Latest version

Example usage:

Cargo.toml:

ohmysmtp = "0.1.1"

Code:

use ohmysmtp::{Email, File, FileType, OhMySmtp};

let email_service = OhMySmtp::new("API_KEY");

let result = email_service.send(&Email::new(
    "from@email.address",
    "to@email.address",
    "Body text",
    ));

    let email_advanced_example =
Email::new("from@email.address", "to@email.address", "Body text")
.with_subject("Subject line")
.with_attachment(File::new(b"File!", "file-name.txt", & FileType::Txt));

match email_service.send( & email_advanced_example) {
Ok(()) => println ! ("Success!"),
Err(e) => println ! ("Error :(")
}

Roadmap

  • Add email validation with email-address-parser
  • Add deliverability check with check-if-email-exists
  • Maybe add temp email check (though I am sort of opposed to this as someone who uses them for crappy services :p)

Changelog

0.1.1

0.1.0

  • Initial release

Show appreciation

Want to say thanks for this library? Just click the button below and leave a brief note. It would make my day :)

Click me to show appreciation

Commit count: 30

cargo fmt