mailslurp/models/
email_preview.rs

1/*
2 * MailSlurp API
3 *
4 * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5 *
6 * The version of the OpenAPI document: 6.5.2
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// EmailPreview : Preview of an email message. For full message (including body and attachments) call the `getEmail` or other email endpoints with the provided email ID.
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct EmailPreview {
17    /// List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension.
18    #[serde(rename = "attachments", skip_serializing_if = "Option::is_none")]
19    pub attachments: Option<Vec<String>>,
20    /// List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names.
21    #[serde(rename = "bcc", skip_serializing_if = "Option::is_none")]
22    pub bcc: Option<Vec<String>>,
23    /// List of `CC` recipients email addresses that the email was addressed to. See recipients object for names.
24    #[serde(rename = "cc", skip_serializing_if = "Option::is_none")]
25    pub cc: Option<Vec<String>>,
26    /// When was the email received by MailSlurp
27    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
28    pub created_at: Option<String>,
29    /// Who the email was sent from. An email address - see fromName for the sender name.
30    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
31    pub from: Option<String>,
32    /// ID of the email entity
33    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
34    pub id: Option<String>,
35    /// Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks.
36    #[serde(rename = "read", skip_serializing_if = "Option::is_none")]
37    pub read: Option<bool>,
38    /// The subject line of the email message as specified by SMTP subject header
39    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
40    pub subject: Option<String>,
41    /// List of `To` recipient email addresses that the email was addressed to. See recipients object for names.
42    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
43    pub to: Option<Vec<String>>,
44}
45
46impl EmailPreview {
47    /// Preview of an email message. For full message (including body and attachments) call the `getEmail` or other email endpoints with the provided email ID.
48    pub fn new() -> EmailPreview {
49        EmailPreview {
50            attachments: None,
51            bcc: None,
52            cc: None,
53            created_at: None,
54            from: None,
55            id: None,
56            read: None,
57            subject: None,
58            to: None,
59        }
60    }
61}
62
63