[][src]Struct socketlabz::message::Message

pub struct Message<'a> { /* fields omitted */ }

This is a representation of a valid SocketLabs email message.

Methods

impl<'a> Message<'a>[src]

pub fn new<T: Into<Cow<'a, str>>>(address: T, name: Option<T>) -> Message<'a>[src]

Create a new Message object with all fields empty but the from field.

pub fn add_to<T: Into<Cow<'a, str>>>(&mut self, address: T, name: Option<T>)[src]

Adds a new recipient to the Message struct.

pub fn set_from<T: Into<Cow<'a, str>>>(&mut self, address: T, name: Option<T>)[src]

Sets the from field in the Message struct.

pub fn set_subject<T: Into<Cow<'a, str>>>(&mut self, subject: T)[src]

Sets the subject field in the Message struct.

pub fn set_text<T: Into<Cow<'a, str>>>(&mut self, text: T)[src]

Sets the text_body field in the Message struct.

pub fn set_html<T: Into<Cow<'a, str>>>(&mut self, html: T)[src]

Sets the html_body field in the Message struct.

pub fn set_api_template<T: Into<Cow<'a, str>>>(&mut self, api_template: T)[src]

Sets the api_template field in the Message struct.

pub fn set_message_id<T: Into<Cow<'a, str>>>(&mut self, message_id: T)[src]

Sets the message_id field in the Message struct.

pub fn set_charset<T: Into<Cow<'a, str>>>(&mut self, charset: T)[src]

Sets the charset field in the Message struct.

pub fn add_headers<T: Into<Cow<'a, str>> + Eq + Hash>(
    &mut self,
    headers: HashMap<T, T>
)
[src]

Adds headers to the custom_header field in the Message struct.

pub fn add_cc<T: Into<Cow<'a, str>>>(&mut self, address: T, name: Option<T>)[src]

Adds a new cc'd recipient to the Message struct.

pub fn add_bcc<T: Into<Cow<'a, str>>>(&mut self, address: T, name: Option<T>)[src]

Adds a new bcc'd recipient to the Message struct.

pub fn set_reply_to<T: Into<Cow<'a, str>>>(
    &mut self,
    address: T,
    name: Option<T>
)
[src]

Sets the from field in the Message struct.

Trait Implementations

impl<'a> Debug for Message<'a>[src]

impl<'a> Serialize for Message<'a>[src]

Auto Trait Implementations

impl<'a> Send for Message<'a>

impl<'a> Sync for Message<'a>

Blanket Implementations

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.

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

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

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

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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