Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sigaloid/ohmysmtp

A MailPace client.
https://github.com/sigaloid/ohmysmtp

api email mail mailpace rust

Last synced: 27 days ago
JSON representation

A MailPace client.

Awesome Lists containing this project

README

        

# MailPace - Rust client

[formerly known as OhMySMTP](https://blog.mailpace.com/blog/ohmysmtp-is-now-mailpace/), but I will not be renaming the library for now.

[![Documentation](https://docs.rs/ohmysmtp/badge.svg)](https://docs.rs/ohmysmtp)
[![Latest version](https://img.shields.io/crates/v/ohmysmtp.svg)](https://crates.io/crates/ohmysmtp)

### Example usage:

#### Cargo.toml:

```toml
ohmysmtp = "0.1.1"
```

#### Code:

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

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

let result = email_service.send(&Email::new(
"[email protected]",
"[email protected]",
"Body text",
));

let email_advanced_example =
Email::new("[email protected]", "[email protected]", "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

- [x] 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

* Add optional local email validation before sending to OhMySmtp (behind `email-validation` feature)
* Reuse ureq agent (header reuse pending https://github.com/algesten/ureq/issues/444)

#### 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](https://img.shields.io/badge/Say%20Thanks-%F0%9F%A6%80%F0%9F%A6%80%F0%9F%A6%80-1EAEDB.svg)](https://saythanks.io/to/sigaloid)