summaryrefslogtreecommitdiffstats
path: root/src/error.rs
blob: 48d4690c4e11bda5d43523a5e8d8fbbf5231193a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use std::io::{Error as IoError};
use ::error::Error;
use new_tokio_smtp::error::LogicError;

#[derive(Debug)]
pub enum MailSendError {
    CreatingEnvelop(EnvelopFromMailError),
    Composition(Error),
    Encoding(Error),
    //Note with pipelining this will change to Vec<LogicError>
    Smtp(LogicError),
    Io(IoError),
    DriverDropped,
    CanceledByDriver
}


#[derive(Debug)]
pub enum EnvelopFromMailError {
    NeitherSenderNorFrom,
    TypeError(Error),
    NoSenderAndMoreThanOneFrom,
    NoToHeaderField
}