Struct mailgun46::Mailer [−][src]
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]
domain: impl AsRef<str>,
token: impl AsRef<str>
) -> Result<Self, SetupError>
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]
mg_url: impl AsRef<str>,
domain: impl AsRef<str>,
token: impl AsRef<str>
) -> Result<Self, SetupError>
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,