Struct sendgrid::v3::Attachment
[−]
[src]
pub struct Attachment { /* fields omitted */ }
An attachment block for a V3 message. Content and filename are required. If the mime_type is unspecified, the email will use Sendgrid's default for attachments which is 'application/octet-stream'.
Methods
impl Attachment
[src]
fn new() -> Attachment
Construct a new attachment for this message.
fn set_content(&mut self, c: &[u8])
The raw body of the attachment.
fn set_filename(&mut self, filename: &str)
Sets the filename for the attachment.
fn set_mime_type(&mut self, mime: &str)
Set an optional mime type. Sendgrid will default to 'application/octet-stream' if unspecified.