[][src]Struct mailgang::curl_mail::Mailer

pub struct Mailer(_, _, _);

Struct used to indiciate the api key for sparkpost is and if it is the eu version or not. Also needs the email where you going to send from. (api key, sender email, eu version of api)

Implementations

impl Mailer[src]

pub fn default() -> Result<Mailer, &'static str>[src]

Default mailer is made from a .env config file. Lines in the .env config file to be set. SPARK_KEY: sparkpost api key SENDER: email from where the mail will be send USE_EU: Boolean to indicate if you want to use the EU version, or if not set false to use the USA version.

pub fn send_mail(
    &self,
    email: &str,
    subject: &str,
    msg: &str,
    html_msg: &str
) -> Result<(), &'static str>
[src]

Trait Implementations

impl Clone 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.