Struct mailstrom::Mailstrom [−][src]
pub struct Mailstrom<S: MailstromStorage + 'static> { /* fields omitted */ }
Methods
impl<S: MailstromStorage + 'static> Mailstrom<S>
[src]
impl<S: MailstromStorage + 'static> Mailstrom<S>
pub fn new(config: Config, storage: S) -> Mailstrom<S>
[src]
pub fn new(config: Config, storage: S) -> Mailstrom<S>
Create a new Mailstrom instance for sending emails.
pub fn start(&mut self) -> Result<(), Error>
[src]
pub fn start(&mut self) -> Result<(), Error>
Mailstrom requires an explicit start command to start sending emails. This is because some clients are only interested in reading the status of sent emails, and will terminate before any real sending can be accomplished.
pub fn die(&mut self) -> Result<(), Error>
[src]
pub fn die(&mut self) -> Result<(), Error>
Ask Mailstrom to die. This is not required, you can simply let it fall out of scope and it will clean itself up.
pub fn worker_status(&self) -> WorkerStatus
[src]
pub fn worker_status(&self) -> WorkerStatus
Determine the status of the worker
pub fn send_email(&mut self, email: Email) -> Result<String, Error>
[src]
pub fn send_email(&mut self, email: Email) -> Result<String, Error>
Send an email, getting back its message-id
pub fn query_status(&mut self, message_id: &str) -> Result<MessageStatus, Error>
[src]
pub fn query_status(&mut self, message_id: &str) -> Result<MessageStatus, Error>
pub fn query_recent(&mut self) -> Result<Vec<MessageStatus>, Error>
[src]
pub fn query_recent(&mut self) -> Result<Vec<MessageStatus>, Error>
Trait Implementations
impl<S: MailstromStorage + 'static> Drop for Mailstrom<S>
[src]
impl<S: MailstromStorage + 'static> Drop for Mailstrom<S>