| Crates.io | ohmysmtp |
| lib.rs | ohmysmtp |
| version | 0.1.1 |
| created_at | 2021-12-09 23:14:21.942163+00 |
| updated_at | 2021-12-12 19:57:39.612508+00 |
| description | An OhMySMTP client |
| homepage | |
| repository | https://github.com/sigaloid/ohmysmtp/ |
| max_upload_size | |
| id | 495441 |
| size | 19,183 |
ohmysmtp = "0.1.1"
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 :(")
}
email-address-parsercheck-if-email-existsemail-validation feature)Want to say thanks for this library? Just click the button below and leave a brief note. It would make my day :)