pub struct SmtpBuilder { /* private fields */ }Expand description
Builder for SMTP messages (commands and replies).
Implementations§
Source§impl SmtpBuilder
impl SmtpBuilder
pub fn new() -> Self
pub fn reply(self, code: u16, text: impl Into<String>) -> Self
pub fn multiline(self, lines: Vec<String>) -> Self
Sourcepub fn service_ready(self, domain: impl Into<String>) -> Self
pub fn service_ready(self, domain: impl Into<String>) -> Self
220 Service ready (server greeting).
Sourcepub fn auth_success(self) -> Self
pub fn auth_success(self) -> Self
235 Authentication successful.
Sourcepub fn ehlo_response(
self,
domain: impl Into<String>,
extensions: Vec<String>,
) -> Self
pub fn ehlo_response( self, domain: impl Into<String>, extensions: Vec<String>, ) -> Self
250 OK (multi-line, EHLO response).
Sourcepub fn auth_challenge(self, challenge: impl Into<String>) -> Self
pub fn auth_challenge(self, challenge: impl Into<String>) -> Self
334 Server challenge (AUTH).
Sourcepub fn start_mail_input(self) -> Self
pub fn start_mail_input(self) -> Self
354 Start mail input.
421 Service unavailable.
450 Mailbox temporarily unavailable.
Sourcepub fn auth_required(self) -> Self
pub fn auth_required(self) -> Self
530 Authentication required.
Sourcepub fn auth_failed(self) -> Self
pub fn auth_failed(self) -> Self
535 Authentication failed.
Sourcepub fn mailbox_not_found(self, text: impl Into<String>) -> Self
pub fn mailbox_not_found(self, text: impl Into<String>) -> Self
550 Mailbox not found.
pub fn command(self, verb: impl Into<String>, args: impl Into<String>) -> Self
Sourcepub fn auth(
self,
mechanism: impl Into<String>,
initial_resp: impl Into<String>,
) -> Self
pub fn auth( self, mechanism: impl Into<String>, initial_resp: impl Into<String>, ) -> Self
AUTH
pub fn build(&self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl Clone for SmtpBuilder
impl Clone for SmtpBuilder
Source§fn clone(&self) -> SmtpBuilder
fn clone(&self) -> SmtpBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SmtpBuilder
impl Debug for SmtpBuilder
Auto Trait Implementations§
impl Freeze for SmtpBuilder
impl RefUnwindSafe for SmtpBuilder
impl Send for SmtpBuilder
impl Sync for SmtpBuilder
impl Unpin for SmtpBuilder
impl UnsafeUnpin for SmtpBuilder
impl UnwindSafe for SmtpBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more