### Virtual Method

# Camel Session addressbook_contains_sync

since: 3.44

#### Declaration [src]

    gboolean
    addressbook_contains_sync (
      CamelSession* session,
      const gchar* book_uid,
      const gchar* email_address,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Look up in an address book `book_uid` for an address `email_address` and returns whether any such contact exists.

The `book_uid` can be either one of the special constants `CAMEL_SESSION_BOOK_UID_ANY` or `CAMEL_SESSION_BOOK_UID_COMPLETION`, or it can be a UID of a configured address book.

The `email_address` can contain multiple addresses, then the function checks whether any of the given addresses is in the address book.

Available since: 3.44

#### Parameters

`book_uid`

  Type: `const gchar*`

  An address book UID.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`email_address`

  Type: `const gchar*`

  An email address to check for.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the virtual function if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE`, when the `email_address` could be found in the `book_uid`.