Files
lettre/website/content/sending-messages/sendmail.md
Alexis Mousset e85c3a4d70 add website
2017-05-25 22:18:31 +02:00

594 B

+++ date = "2017-05-21T23:46:17+02:00" title = "Sendmail transport" toc = true weight = 3

+++

The sendmail transport sends the email using the local sendmail command.

{{< highlight rust >}} use lettre::sendmail::SendmailTransport; use lettre::{SimpleSendableEmail, EmailTransport};

let email = SimpleSendableEmail::new( "user@localhost", vec!["root@localhost"], "message_id", "Hello world" );

let mut sender = SendmailTransport::new(); let result = sender.send(email); assert!(result.is_ok()); {{< /highlight >}}