[−][src]Struct socketlabz::message::Message
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]
&mut self,
headers: HashMap<T, T>
)
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]
&mut self,
address: T,
name: Option<T>
)
Sets the from field in the Message struct.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,