ohmysmtp 0.1.0

An OhMySMTP client
Documentation

OhMySMTP - Rust client

Example usage:

Cargo.toml:

ohmysmtp = { git = "https://github.com/sigaloid/ohmysmtp" }

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 :(")
}

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