remove mmime

This commit is contained in:
dignifiedquire
2019-11-28 19:20:43 +01:00
parent 1f8d2531cc
commit dbd6303829
48 changed files with 2746 additions and 25814 deletions

View File

@@ -608,7 +608,7 @@ pub fn job_send_msg(context: &Context, msg_id: MsgId) -> Result<(), Error> {
mimefactory.msg.try_calc_and_set_dimensions(context).ok();
/* create message */
if let Err(msg) = unsafe { mimefactory.render() } {
if let Err(msg) = mimefactory.render() {
let e = msg.to_string();
message::set_msg_failed(context, msg_id, Some(e));
return Err(msg);
@@ -867,7 +867,7 @@ fn suspend_smtp_thread(context: &Context, suspend: bool) {
fn send_mdn(context: &Context, msg_id: MsgId) -> Result<(), Error> {
let mut mimefactory = MimeFactory::load_mdn(context, msg_id)?;
unsafe { mimefactory.render()? };
mimefactory.render()?;
add_smtp_job(context, Action::SendMdn, &mut mimefactory)?;
Ok(())
@@ -880,12 +880,7 @@ fn add_smtp_job(context: &Context, action: Action, mimefactory: &MimeFactory) ->
"no recipients for smtp job set"
);
let mut param = Params::new();
let bytes = unsafe {
std::slice::from_raw_parts(
(*mimefactory.out).str_0 as *const u8,
(*mimefactory.out).len,
)
};
let bytes = &mimefactory.out;
let blob = BlobObject::create(context, &mimefactory.rfc724_mid, bytes)?;
let recipients = mimefactory.recipients_addr.join("\x1e");
param.set(Param::File, blob.as_name());