[][src]Struct outlook_exe::MessageBuilder

pub struct MessageBuilder { /* fields omitted */ }

The MessageBuilder type, for drafting Outlook email messages.

Implementations

impl MessageBuilder[src]

#[must_use]pub const fn new() -> Self[src]

Creates a new MessageBuilder.

#[must_use]pub fn with_subject<S>(self, subj: S) -> Self where
    S: Into<String>, 
[src]

Adds a subject to the email.

This should only be called once per MessageBuilder instance.

#[must_use]pub fn with_recipient<S>(self, to: S) -> Self where
    S: Into<String>, 
[src]

Adds a recipient to the email.

#[must_use]pub fn with_recipient_cc<S>(self, cc: S) -> Self where
    S: Into<String>, 
[src]

Adds a CC recipient to the email.

#[must_use]pub fn with_recipient_bcc<S>(self, bcc: S) -> Self where
    S: Into<String>, 
[src]

Adds a BCC recipient to the email.

#[must_use]pub fn with_body<S>(self, body: S) -> Self where
    S: Into<String>, 
[src]

Adds a body to the email.

This should only be called once per MessageBuilder instance.

#[must_use]pub fn with_attachment<S>(self, file: S) -> Self where
    S: Into<String>, 
[src]

Adds an attachment to the email.

This should only be called once per MessageBuilder instance, because Outlook's command-line switches only supports attaching a single file per invocation.

pub fn spawn(self) -> Result<Child>[src]

Spawns an Outlook process, and prompts the user to press "Send".

Errors

Will return Err(io::Error) if OUTLOOK.EXE cannot be located, or if a child process cannot be spawned.

Trait Implementations

impl Clone for MessageBuilder[src]

impl Debug for MessageBuilder[src]

impl Default for MessageBuilder[src]

impl Eq for MessageBuilder[src]

impl PartialEq<MessageBuilder> for MessageBuilder[src]

impl StructuralEq for MessageBuilder[src]

impl StructuralPartialEq for MessageBuilder[src]

Auto Trait Implementations

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, 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.