Function create_send_msg_jobs

Source
pub(crate) async fn create_send_msg_jobs(
    context: &Context,
    msg: &mut Message,
) -> Result<Vec<i64>>
Expand description

Constructs jobs for sending a message and inserts them into the appropriate table.

Updates the message GuaranteeE2ee parameter and persists it in the database depending on whether the message is added to the outgoing queue as encrypted or not.

Returns row ids if smtp table jobs were created or an empty Vec otherwise.

The caller has to interrupt SMTP loop or otherwise process new rows.