1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use crate::delivery_result::DeliveryResult;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InternalRecipientStatus {
pub email_addr: String,
pub smtp_email_addr: String,
pub domain: String,
pub mx_servers: Option<Vec<String>>,
pub current_mx: usize,
pub result: DeliveryResult,
}
impl InternalRecipientStatus {
pub fn as_recipient_status(&self) -> RecipientStatus {
RecipientStatus {
recipient: self.email_addr.clone(),
result: self.result.clone(),
}
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct RecipientStatus {
pub recipient: String,
pub result: DeliveryResult,
}