pub struct EmailMessage {
pub from: String,
pub to: Vec<String>,
pub cc: Vec<String>,
pub bcc: Vec<String>,
pub subject: String,
pub body: Option<String>,
pub html_body: Option<String>,
pub attachments: Vec<Attachment>,
pub headers: Vec<(String, String)>,
pub message_id: Option<String>,
pub reply_to: Option<String>,
}Expand description
邮件消息结构体
存储邮件的所有元数据和内容,支持生成符合 RFC 5322 标准的邮件内容。
Fields§
§from: String发件人地址
to: Vec<String>收件人地址列表
cc: Vec<String>抄送地址列表
bcc: Vec<String>密送地址列表
subject: String邮件主题
body: Option<String>纯文本正文
html_body: Option<String>HTML 正文
attachments: Vec<Attachment>附件列表
headers: Vec<(String, String)>自定义头部字段
message_id: Option<String>消息 ID
reply_to: Option<String>回复地址
Implementations§
Trait Implementations§
Source§impl Clone for EmailMessage
impl Clone for EmailMessage
Source§fn clone(&self) -> EmailMessage
fn clone(&self) -> EmailMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmailMessage
impl Debug for EmailMessage
Source§impl Default for EmailMessage
impl Default for EmailMessage
Source§fn default() -> EmailMessage
fn default() -> EmailMessage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EmailMessage
impl RefUnwindSafe for EmailMessage
impl Send for EmailMessage
impl Sync for EmailMessage
impl Unpin for EmailMessage
impl UnsafeUnpin for EmailMessage
impl UnwindSafe for EmailMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more