Struct mailgun46::Mailer[][src]

pub struct Mailer { /* fields omitted */ }

Implementations

impl Mailer[src]

pub fn from_env() -> Result<Self, SetupError>[src]

Creates a new Mailer by reading from Environment variables:

  • MAILER46_DOMAIN: The domain to send from.
  • MAILER46_TOKEN: The raw token received from Mailgun.

Uses base url to mailgun: https://api.eu.mailgun.net

pub fn new(
    domain: impl AsRef<str>,
    token: impl AsRef<str>
) -> Result<Self, SetupError>
[src]

Creates a new client operating against the given domain. Notice that the token must be the one provided by Mailgun, Mailer46 turns it into base64.

Uses base url to mailgun: https://api.eu.mailgun.net

pub fn new_with_mg_url(
    mg_url: impl AsRef<str>,
    domain: impl AsRef<str>,
    token: impl AsRef<str>
) -> Result<Self, SetupError>
[src]

Trait Implementations

impl Debug for Mailer[src]

Auto Trait Implementations

impl !RefUnwindSafe for Mailer

impl Send for Mailer

impl Sync for Mailer

impl Unpin for Mailer

impl !UnwindSafe for Mailer

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> Instrument 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.