Struct deltachat::mimefactory::MimeFactory
source · pub struct MimeFactory {Show 13 fields
from_addr: String,
from_displayname: String,
sender_displayname: Option<String>,
selfstatus: String,
recipients: Vec<(String, String)>,
timestamp: i64,
loaded: Loaded,
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
§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
True if the message requests Message Disposition Notification
using Chat-Disposition-Notification-To
header.
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 MimeFactory
impl MimeFactory
pub async fn from_msg(context: &Context, msg: Message) -> Result<MimeFactory>
pub async fn from_mdn( context: &Context, from_id: ContactId, rfc724_mid: String, additional_msg_ids: Vec<String>, ) -> Result<MimeFactory>
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>
fn should_attach_profile_data(msg: &Message) -> 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 Vec<Header>, grpimage: &Option<String>, is_encrypted: bool, ) -> Result<(PartBuilder, Vec<PartBuilder>)>
sourcefn render_mdn(&mut self) -> Result<PartBuilder>
fn render_mdn(&mut self) -> Result<PartBuilder>
Render an MDN
Trait Implementations§
source§impl Clone for MimeFactory
impl Clone for MimeFactory
source§fn clone(&self) -> MimeFactory
fn clone(&self) -> MimeFactory
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for MimeFactory
impl RefUnwindSafe for MimeFactory
impl Send for MimeFactory
impl Sync for MimeFactory
impl Unpin for MimeFactory
impl UnwindSafe for MimeFactory
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)