Expand description
§use-smtp
SMTP protocol vocabulary primitives for RustUse.
§Experimental
use-smtp is experimental while use-email remains below 0.3.0.
§Example
use use_smtp::{MailFrom, RcptTo, SmtpCommand, SmtpReply, SmtpReplyCode};
let mail_from = SmtpCommand::MailFrom(MailFrom::new("bounce@example.com")?);
let rcpt_to = SmtpCommand::RcptTo(RcptTo::new("jane@example.com")?);
let reply = SmtpReply::new(SmtpReplyCode::new(250)?, "OK")?;
assert_eq!(mail_from.to_string(), "MAIL FROM:<bounce@example.com>");
assert_eq!(rcpt_to.to_string(), "RCPT TO:<jane@example.com>");
assert_eq!(reply.to_string(), "250 OK");§Scope
- SMTP command, reply, reply code, enhanced status code, extension, EHLO keyword, MAIL FROM, RCPT TO, DATA, QUIT, and capability markers.
- Protocol vocabulary only.
§Non-goals
- Network client behavior.
- TLS negotiation.
- Authentication, delivery, retry, queue, or provider integration.
§License
Licensed under either Apache-2.0 or MIT.
Structs§
- Data
Command - DATA command marker.
- Ehlo
Keyword - EHLO keyword metadata.
- Eight
BitMime Capability - 8BITMIME capability marker.
- Mail
From - MAIL FROM command.
- Quit
Command - QUIT command marker.
- RcptTo
- RCPT TO command.
- Smtp
Enhanced Status Code - SMTP enhanced status code.
- Smtp
Reply - SMTP reply line metadata.
- Smtp
Reply Code - SMTP reply code.
- Smtp
Utf8 Capability - SMTPUTF8 capability marker.
- Start
TlsCapability - STARTTLS capability marker.
Enums§
- Smtp
Command - SMTP command vocabulary.
- Smtp
Error - Error returned by SMTP vocabulary constructors.
- Smtp
Extension - SMTP extension labels.