Function deltachat::receive_imf::from_field_to_contact_id

source ·
pub async fn from_field_to_contact_id(
    context: &Context,
    from: &SingleInfo,
    prevent_rename: bool
) -> Result<Option<(ContactId, bool, Origin)>>
Expand description

Converts “From” field to contact id.

Also returns whether it is blocked or not and its origin.

  • prevent_rename: if true, the display_name of this contact will not be changed. Useful for mailing lists: In some mailing lists, many users write from the same address but with different display names. We don’t want the display name to change every time the user gets a new email from a mailing list.

Returns None if From field does not contain a valid contact address.