MCPcopy Create free account
hub / github.com/chatmail/core / insert_into_smtp

Function insert_into_smtp

src/securejoin.rs:741–757  ·  view source on GitHub ↗
(
    context: &Context,
    rfc724_mid: &str,
    recipient: &str,
    rendered_message: String,
    msg_id: MsgId,
)

Source from the content-addressed store, hash-verified

739}
740
741async fn insert_into_smtp(
742 context: &Context,
743 rfc724_mid: &str,
744 recipient: &str,
745 rendered_message: String,
746 msg_id: MsgId,
747) -> Result<(), Error> {
748 context
749 .sql
750 .execute(
751 "INSERT INTO smtp (rfc724_mid, recipients, mime, msg_id)
752 VALUES (?1, ?2, ?3, ?4)",
753 (&rfc724_mid, &recipient, &rendered_message, msg_id),
754 )
755 .await?;
756 Ok(())
757}
758
759/// Observe self-sent Securejoin message.
760///

Callers 2

send_handshake_messageFunction · 0.85

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected