# get()

Canonical URL: https://developers.iagenify.com/ar/sdk/ref/mail/contacts/get/
Language: ar

`api.mail.contacts.get(address) → Promise<Contact|null>`

اتصال واحد بالعنوان - أو لا وجود له - لا يرمى.

Status: free · null, not 404 · by address

```javascript
const contact = await api.mail.contacts.get("fedy@example.net");

if (contact) showName(contact.name);
else showAddress("fedy@example.net");
```

## "الجواب العادي" {#null}

> **معظم المراسلين ليسوا في دفتر عناوين**
>
> إن الرمي من أجل القضية المشتركة يعني إنهاء كل بحث في محاولة. "البطل هو ما يبدو عليه "هذا الشخص لم يتم إنقاذه".

## العنوان هو المفتاح، {#exact}

مراسل يكتب من عنوان ثان هو اتصال ثانٍ لا شيء مدمج ولا شيء يُخمن أن عنوانين هما نفس الشخص

## لقائمة، واجلب مرة واحدة {#lists}

```javascript
// Not one get() per row
const byAddress = new Map((await api.mail.contacts.list()).map((c) => [c.address, c]));
```

## رسائل نقل بالفعل الصورة {#messages}

`from.avatar` تم حل رسالة من خلال السلسلة بأكملها. هذا النداء لصفحة دفتر عناوين ، ليس لعرض رسالة.

- [save()](/ar/sdk/ref/mail/contacts/save): خلق واحد
- [messages.get()](/ar/sdk/ref/mailbox/messages/get): حيث يتم استخدامها.

```python
contact = api.mail.contacts.get("fedy@example.net")

if contact:
    show_name(contact["name"])
else:
    show_address("fedy@example.net")
```

```python
# Not one get() per row
by_address = {c["address"]: c for c in api.mail.contacts.list()}
```
