[][src]Struct cheap_alerts::SenderBuilder

pub struct SenderBuilder { /* fields omitted */ }

A builder for easily creating a Sender

Methods

impl SenderBuilder[src]

pub fn address(self, from: &str) -> Self[src]

Set the address for this sender to send from.

Note: This is required to be used.

pub fn file<'a, P: AsRef<Path>>(
    self,
    p: P
) -> Result<Sender<'a, FileResult>, Error>
[src]

This takes a file path and will write the email to a file on the file system as json using

pub fn sendmail<'a>(self) -> Result<Sender<'a, SendmailResult>, Error>[src]

This uses the sendmail cli tool for sending an email

pub fn smtp_unencrypted_localhost<'a>(
    self
) -> Result<Sender<'a, SmtpResult>, Error>
[src]

Unencrypted Localhost, this is by far the simplest, but least secure

pub fn smtp_simple<'a>(
    self,
    domain: &str
) -> Result<Sender<'a, SmtpResult>, Error>
[src]

You provide a domain (as an &str) and it will use TLS to send the message

pub fn smtp_full<'a, A: ToSocketAddrs>(
    self,
    addr: A,
    security: ClientSecurity
) -> Result<Sender<'a, SmtpResult>, Error>
[src]

You provide the socket address and security see the lettre documentation to learn more

pub fn smtp<'a>(self, smtp: SmtpClient) -> Result<Sender<'a, SmtpResult>, Error>[src]

The most manual method, you need to provide the fully constructed client see the lettre documentation to learn more

pub fn stdout<'a>(self) -> Result<Sender<'a, Result<()>>, Error>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.