Struct deltachat::mimefactory::MimeFactory
source · pub struct MimeFactory<'a> {Show 14 fields
from_addr: String,
from_displayname: String,
sender_displayname: Option<String>,
selfstatus: String,
recipients: Vec<(String, String)>,
timestamp: i64,
loaded: Loaded,
msg: &'a Message,
in_reply_to: String,
references: String,
req_mdn: bool,
last_added_location_id: Option<u32>,
sync_ids_to_delete: Option<String>,
pub attach_selfavatar: bool,
}
Expand description
Helper to construct mime messages.
Fields§
§from_addr: String
§from_displayname: String
§sender_displayname: Option<String>
Goes to the Sender:
-header, if set.
For overridden names, sender_displayname
is set to the
config-name while from_displayname
is set to the overridden name.
From the perspective of the receiver,
a set Sender:
-header is used as an indicator that the name is overridden;
names are alsways read from the From:
-header.
selfstatus: String
§recipients: Vec<(String, String)>
Vector of pairs of recipient name and address
timestamp: i64
§loaded: Loaded
§msg: &'a Message
§in_reply_to: String
§references: String
Space-separated list of Message-IDs for References
header.
Each Message-ID in the list may or may not be enclosed in angle brackets, angle brackets must be added during message rendering as needed.
req_mdn: bool
§last_added_location_id: Option<u32>
§sync_ids_to_delete: Option<String>
If the created mime-structure contains sync-items,
the IDs of these items are listed here.
The IDs are returned via RenderedEmail
and must be deleted if the message is actually queued for sending.
attach_selfavatar: bool
True if the avatar should be attached.
Implementations§
source§impl<'a> MimeFactory<'a>
impl<'a> MimeFactory<'a>
pub async fn from_msg( context: &Context, msg: &'a Message ) -> Result<MimeFactory<'a>>
pub async fn from_mdn( context: &Context, msg: &'a Message, additional_msg_ids: Vec<String> ) -> Result<MimeFactory<'a>>
async fn peerstates_for_recipients( &self, context: &Context ) -> Result<Vec<(Option<Peerstate>, String)>>
fn is_e2ee_guaranteed(&self) -> bool
fn verified(&self) -> bool
fn should_force_plaintext(&self) -> bool
fn should_skip_autocrypt(&self) -> bool
async fn should_do_gossip( &self, context: &Context, multiple_recipients: bool ) -> Result<bool>
async fn should_attach_selfavatar(context: &Context, msg: &Message) -> bool
fn grpimage(&self) -> Option<String>
async fn subject_str(&self, context: &Context) -> Result<String>
pub fn recipients(&self) -> Vec<String>
sourcepub async fn render(self, context: &Context) -> Result<RenderedEmail>
pub async fn render(self, context: &Context) -> Result<RenderedEmail>
Consumes a MimeFactory
and renders it into a message which is then stored in
smtp
-table to be used by the SMTP loop
sourcefn get_message_kml_part(&self) -> Option<PartBuilder>
fn get_message_kml_part(&self) -> Option<PartBuilder>
Returns MIME part with a message.kml
attachment.
sourceasync fn get_location_kml_part(
&mut self,
context: &Context
) -> Result<Option<PartBuilder>>
async fn get_location_kml_part( &mut self, context: &Context ) -> Result<Option<PartBuilder>>
Returns MIME part with a location.kml
attachment.
fn add_message_text(&self, part: PartBuilder, text: String) -> PartBuilder
async fn render_message( &mut self, context: &Context, headers: &mut MessageHeaders, grpimage: &Option<String>, is_encrypted: bool ) -> Result<(PartBuilder, Vec<PartBuilder>)>
sourceasync fn render_mdn(&mut self, context: &Context) -> Result<PartBuilder>
async fn render_mdn(&mut self, context: &Context) -> Result<PartBuilder>
Render an MDN
Trait Implementations§
source§impl<'a> Clone for MimeFactory<'a>
impl<'a> Clone for MimeFactory<'a>
source§fn clone(&self) -> MimeFactory<'a>
fn clone(&self) -> MimeFactory<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more