Struct mailgun46::Mailer [−][src]
pub struct Mailer { /* fields omitted */ }
Implementations
impl Mailer
[src]
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 !RefUnwindSafe for Mailer
impl !UnwindSafe for Mailer
impl !UnwindSafe for Mailer
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]