/* mail is being copied or moved. However, this is set also with
mailbox_save_using_mail() and then saving==TRUE. */
bool copying_or_moving:1;
- /* dest_mail was set via mailbox_save_set_dest_mail() */
- bool dest_mail_external:1;
};
struct mailbox_sync_context {
{
i_assert(ctx->dest_mail != NULL);
- if (!ctx->dest_mail_external)
- mail_free(&ctx->dest_mail);
- else
- ctx->dest_mail = NULL;
+ mail_free(&ctx->dest_mail);
}
void mailbox_save_set_flags(struct mail_save_context *ctx,
ctx->data.pop3_order = order;
}
-void mailbox_save_set_dest_mail(struct mail_save_context *ctx,
- struct mail *mail)
-{
- i_assert(mail != NULL);
-
- if (!ctx->dest_mail_external)
- mail_free(&ctx->dest_mail);
- ctx->dest_mail = mail;
- ctx->dest_mail_external = TRUE;
-}
-
struct mail *mailbox_save_get_dest_mail(struct mail_save_context *ctx)
{
return ctx->dest_mail;
of the mailbox. Not all backends support this. */
void mailbox_save_set_pop3_order(struct mail_save_context *ctx,
unsigned int order);
-/* FIXME: Remove in v2.3. Obsolete - use mailbox_save_get_dest_mail() instead */
-void mailbox_save_set_dest_mail(struct mail_save_context *ctx,
- struct mail *mail);
/* Returns the destination mail */
struct mail *mailbox_save_get_dest_mail(struct mail_save_context *ctx);
/* Begin saving the message. All mail_save_set_*() calls must have been called