# Get Message Source

### Mục lục nhanh

* [Ví dụ](#vi-du)
* [Tham số](#tham-so)
* [Giá trị trả về](#gia-tri-tra-ve)

### Ví dụ

{% code title="get\_source.py" %}

```python
from smtppy import SMTPDevClient

client = SMTPDevClient(api_key="YOUR_API_KEY")

source = client.get_message_source(
    account_id="acc_123",
    mailbox_id="mbx_123",
    message_id="msg_123",
)

print(source)
```

{% endcode %}

### Tham số

| Tên          | Kiểu  | Bắt buộc | Mô tả               |
| ------------ | ----- | -------- | ------------------- |
| `account_id` | `str` | ✅        | Account identifier. |
| `mailbox_id` | `str` | ✅        | Mailbox identifier. |
| `message_id` | `str` | ✅        | Message identifier. |

### Giá trị trả về

* `dict[str, Any]`: JSON do API trả về.

{% hint style="info" %}
Method này gọi endpoint `GET /accounts/{account_id}/mailboxes/{mailbox_id}/messages/{message_id}/source`.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://reno.gitbook.io/smtp-py/messages/get-message-source.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
