agentmail 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/agent/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/agent/client/Client.js +1 -1
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +2 -3
- package/dist/cjs/api/resources/inboxes/client/Client.js +10 -3
- package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/types/Metadata.d.ts +6 -0
- package/dist/cjs/api/resources/inboxes/types/Metadata.js +3 -0
- package/dist/cjs/api/resources/inboxes/types/MetadataValue.d.ts +4 -0
- package/dist/cjs/api/resources/inboxes/types/MetadataValue.js +3 -0
- package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.d.ts +8 -1
- package/dist/cjs/api/resources/inboxes/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/types/index.js +2 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -3
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +1 -3
- package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/Inbox.js +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/Metadata.d.ts +8 -0
- package/dist/cjs/serialization/resources/inboxes/types/Metadata.js +40 -0
- package/dist/cjs/serialization/resources/inboxes/types/MetadataValue.d.ts +7 -0
- package/dist/cjs/serialization/resources/inboxes/types/MetadataValue.js +43 -0
- package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.d.ts +3 -1
- package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.js +3 -1
- package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/agent/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/agent/client/Client.mjs +1 -1
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +2 -3
- package/dist/esm/api/resources/inboxes/client/Client.mjs +10 -3
- package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/types/Metadata.d.mts +6 -0
- package/dist/esm/api/resources/inboxes/types/Metadata.mjs +2 -0
- package/dist/esm/api/resources/inboxes/types/MetadataValue.d.mts +4 -0
- package/dist/esm/api/resources/inboxes/types/MetadataValue.mjs +2 -0
- package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.d.mts +8 -1
- package/dist/esm/api/resources/inboxes/types/index.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/types/index.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -3
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +1 -3
- package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.mjs +2 -0
- package/dist/esm/serialization/resources/inboxes/types/Inbox.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/Inbox.mjs +2 -0
- package/dist/esm/serialization/resources/inboxes/types/Metadata.d.mts +8 -0
- package/dist/esm/serialization/resources/inboxes/types/Metadata.mjs +4 -0
- package/dist/esm/serialization/resources/inboxes/types/MetadataValue.d.mts +7 -0
- package/dist/esm/serialization/resources/inboxes/types/MetadataValue.mjs +7 -0
- package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.d.mts +3 -1
- package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.mjs +3 -1
- package/dist/esm/serialization/resources/inboxes/types/index.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +65 -24
- package/dist/llms.txt +184 -184
- package/package.json +1 -1
- package/reference.md +3 -7
|
@@ -5,12 +5,14 @@ import { ClientId } from "./ClientId.mjs";
|
|
|
5
5
|
import { DisplayName } from "./DisplayName.mjs";
|
|
6
6
|
import { Email } from "./Email.mjs";
|
|
7
7
|
import { InboxId } from "./InboxId.mjs";
|
|
8
|
+
import { Metadata } from "./Metadata.mjs";
|
|
8
9
|
export const Inbox = core.serialization.object({
|
|
9
10
|
podId: core.serialization.property("pod_id", PodId),
|
|
10
11
|
inboxId: core.serialization.property("inbox_id", InboxId),
|
|
11
12
|
email: Email,
|
|
12
13
|
displayName: core.serialization.property("display_name", DisplayName.optional()),
|
|
13
14
|
clientId: core.serialization.property("client_id", ClientId.optional()),
|
|
15
|
+
metadata: Metadata.optional(),
|
|
14
16
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
15
17
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
16
18
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
import { MetadataValue } from "./MetadataValue.mjs";
|
|
5
|
+
export declare const Metadata: core.serialization.Schema<serializers.inboxes.Metadata.Raw, AgentMail.inboxes.Metadata>;
|
|
6
|
+
export declare namespace Metadata {
|
|
7
|
+
type Raw = Record<string, MetadataValue.Raw>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
export declare const MetadataValue: core.serialization.Schema<serializers.inboxes.MetadataValue.Raw, AgentMail.inboxes.MetadataValue>;
|
|
5
|
+
export declare namespace MetadataValue {
|
|
6
|
+
type Raw = string | number | boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
export const MetadataValue = core.serialization.undiscriminatedUnion([
|
|
4
|
+
core.serialization.string(),
|
|
5
|
+
core.serialization.number(),
|
|
6
|
+
core.serialization.boolean(),
|
|
7
|
+
]);
|
|
@@ -2,9 +2,11 @@ import type * as AgentMail from "../../../../api/index.mjs";
|
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import type * as serializers from "../../../index.mjs";
|
|
4
4
|
import { DisplayName } from "./DisplayName.mjs";
|
|
5
|
+
import { Metadata } from "./Metadata.mjs";
|
|
5
6
|
export declare const UpdateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.UpdateInboxRequest.Raw, AgentMail.inboxes.UpdateInboxRequest>;
|
|
6
7
|
export declare namespace UpdateInboxRequest {
|
|
7
8
|
interface Raw {
|
|
8
|
-
display_name
|
|
9
|
+
display_name?: DisplayName.Raw | null;
|
|
10
|
+
metadata?: Metadata.Raw | null;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import { DisplayName } from "./DisplayName.mjs";
|
|
4
|
+
import { Metadata } from "./Metadata.mjs";
|
|
4
5
|
export const UpdateInboxRequest = core.serialization.object({
|
|
5
|
-
displayName: core.serialization.property("display_name", DisplayName),
|
|
6
|
+
displayName: core.serialization.property("display_name", DisplayName.optional()),
|
|
7
|
+
metadata: Metadata.optional(),
|
|
6
8
|
});
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.4";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.5.
|
|
1
|
+
export const SDK_VERSION = "0.5.4";
|
package/dist/llms-full.txt
CHANGED
|
@@ -5157,8 +5157,6 @@ For more details on scheduled sending—including how to cancel, reschedule, lis
|
|
|
5157
5157
|
|
|
5158
5158
|
> Configure IMAP and SMTP to access your AgentMail inboxes using email clients or programmatic access.
|
|
5159
5159
|
|
|
5160
|
-
IMAP support is currently under development and will be available in the coming weeks. The documentation below describes the planned functionality. SMTP is fully available today.
|
|
5161
|
-
|
|
5162
5160
|
AgentMail supports standard IMAP and SMTP protocols, allowing you to connect using traditional email clients or integrate with existing systems that rely on these protocols.
|
|
5163
5161
|
|
|
5164
5162
|
## What are IMAP and SMTP?
|
|
@@ -5202,9 +5200,15 @@ be rejected. Make sure to enable SSL/TLS in your email client settings.
|
|
|
5202
5200
|
| **Password** | Your API key |
|
|
5203
5201
|
| **SSL/TLS** | **Required** (must be enabled) |
|
|
5204
5202
|
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
API](/introduction)
|
|
5203
|
+
IMAP exposes the following folders: **INBOX**, **Sent**, **Trash**, and
|
|
5204
|
+
**Spam**. A **Drafts** folder is also listed for client compatibility but
|
|
5205
|
+
always appears empty — use the [AgentMail API](/introduction) to create
|
|
5206
|
+
and manage drafts.
|
|
5207
|
+
|
|
5208
|
+
The IMAP server supports the `IDLE` extension (RFC 2177), so modern
|
|
5209
|
+
clients (Thunderbird, Outlook, Apple Mail) receive new messages
|
|
5210
|
+
push-style without polling. Clients negotiate `IDLE` automatically when
|
|
5211
|
+
supported — no extra configuration needed.
|
|
5208
5212
|
|
|
5209
5213
|
### Python IMAP Example
|
|
5210
5214
|
|
|
@@ -5224,7 +5228,7 @@ try:
|
|
|
5224
5228
|
# Authenticate using inbox email as username
|
|
5225
5229
|
imap.login(inbox_email, api_key)
|
|
5226
5230
|
|
|
5227
|
-
# Select
|
|
5231
|
+
# Select a folder (INBOX, Sent, Trash, or Spam)
|
|
5228
5232
|
imap.select("INBOX")
|
|
5229
5233
|
|
|
5230
5234
|
# Search for all messages
|
|
@@ -5278,16 +5282,18 @@ imap.connect();
|
|
|
5278
5282
|
|
|
5279
5283
|
Use SMTP to send emails from your AgentMail inbox.
|
|
5280
5284
|
|
|
5281
|
-
|
|
5282
|
-
|
|
5285
|
+
Encryption is **required** for all SMTP connections. Connect using **port 465
|
|
5286
|
+
with implicit TLS** (SSL on connect) or **port 587 with STARTTLS** (upgrade
|
|
5287
|
+
in-band). On port 587, attempting to authenticate before issuing `STARTTLS`
|
|
5288
|
+
is rejected with a `538` error.
|
|
5283
5289
|
|
|
5284
|
-
| Setting
|
|
5285
|
-
|
|
|
5286
|
-
| **Host**
|
|
5287
|
-
| **Port**
|
|
5288
|
-
| **Username**
|
|
5289
|
-
| **Password**
|
|
5290
|
-
| **SSL/TLS
|
|
5290
|
+
| Setting | Value |
|
|
5291
|
+
| -------------- | ----------------------------------------------------- |
|
|
5292
|
+
| **Host** | `smtp.agentmail.to` |
|
|
5293
|
+
| **Port** | `465` (implicit TLS) or `587` (STARTTLS) |
|
|
5294
|
+
| **Username** | Your inbox email (e.g., `myinbox@agentmail.to`) |
|
|
5295
|
+
| **Password** | Your API key |
|
|
5296
|
+
| **Encryption** | Port `465`: SSL/TLS on connect · Port `587`: STARTTLS |
|
|
5291
5297
|
|
|
5292
5298
|
The "From" address in your email should match the email address of your inbox
|
|
5293
5299
|
(e.g., `myinbox@agentmail.to`). Using a different From address may result in
|
|
@@ -5318,11 +5324,17 @@ msg["From"] = inbox_email # Use your inbox email as the From address
|
|
|
5318
5324
|
msg["To"] = "recipient@example.com"
|
|
5319
5325
|
msg.attach(MIMEText("This is a test email sent via SMTP.", "plain"))
|
|
5320
5326
|
|
|
5321
|
-
# Connect with
|
|
5327
|
+
# Connect with implicit TLS on port 465 and send
|
|
5322
5328
|
with smtplib.SMTP_SSL("smtp.agentmail.to", 465) as server:
|
|
5323
5329
|
server.login(inbox_email, api_key)
|
|
5324
5330
|
server.send_message(msg)
|
|
5325
5331
|
print("Email sent successfully!")
|
|
5332
|
+
|
|
5333
|
+
# Alternatively, use STARTTLS on port 587:
|
|
5334
|
+
# with smtplib.SMTP("smtp.agentmail.to", 587) as server:
|
|
5335
|
+
# server.starttls()
|
|
5336
|
+
# server.login(inbox_email, api_key)
|
|
5337
|
+
# server.send_message(msg)
|
|
5326
5338
|
```
|
|
5327
5339
|
|
|
5328
5340
|
### TypeScript SMTP Example
|
|
@@ -5337,7 +5349,8 @@ const apiKey = process.env.AGENTMAIL_API_KEY!; // From Dashboard → API Keys
|
|
|
5337
5349
|
const transporter = nodemailer.createTransport({
|
|
5338
5350
|
host: "smtp.agentmail.to",
|
|
5339
5351
|
port: 465,
|
|
5340
|
-
secure: true, //
|
|
5352
|
+
secure: true, // implicit TLS on port 465
|
|
5353
|
+
// For STARTTLS on port 587 instead, use: port: 587, secure: false
|
|
5341
5354
|
auth: {
|
|
5342
5355
|
user: inboxEmail,
|
|
5343
5356
|
pass: apiKey,
|
|
@@ -5359,13 +5372,14 @@ sendEmail().catch(console.error);
|
|
|
5359
5372
|
|
|
5360
5373
|
## Troubleshooting
|
|
5361
5374
|
|
|
5362
|
-
| Error
|
|
5363
|
-
|
|
|
5364
|
-
| "Authentication failed"
|
|
5365
|
-
| "Connection refused"
|
|
5366
|
-
| "
|
|
5367
|
-
| "
|
|
5368
|
-
| "
|
|
5375
|
+
| Error | Cause | Solution |
|
|
5376
|
+
| ------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5377
|
+
| "Authentication failed" | Invalid credentials | Verify your inbox email and API key from the console |
|
|
5378
|
+
| "Connection refused" / handshake error | Wrong encryption mode for the port | Use SSL/TLS on connect for port `465`, or STARTTLS for port `587` |
|
|
5379
|
+
| `538` "Must issue a STARTTLS command first" | Plaintext AUTH on port `587` | Enable STARTTLS on port `587` (or use implicit TLS on `465`) before authenticating |
|
|
5380
|
+
| "Connection timeout" | Firewall blocking ports | Ensure ports 993 (IMAP) and 465/587 (SMTP) are open |
|
|
5381
|
+
| "Sender not authorized" | Wrong From address | Use your inbox's email address as the From address |
|
|
5382
|
+
| "Folder not found" | Folder name typo or unsupported folder | IMAP exposes `INBOX`, `Sent`, `Trash`, and `Spam`. Folder names other than `INBOX` are case-sensitive. Use the [API](/introduction) to manage drafts. |
|
|
5369
5383
|
|
|
5370
5384
|
## When to Use IMAP/SMTP vs API
|
|
5371
5385
|
|
|
@@ -22561,6 +22575,9 @@ components:
|
|
|
22561
22575
|
type: string
|
|
22562
22576
|
format: date-time
|
|
22563
22577
|
description: Time at which entry was created.
|
|
22578
|
+
read_only:
|
|
22579
|
+
type: boolean
|
|
22580
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
22564
22581
|
pod_id:
|
|
22565
22582
|
type: string
|
|
22566
22583
|
description: ID of pod.
|
|
@@ -22865,6 +22882,9 @@ components:
|
|
|
22865
22882
|
type: string
|
|
22866
22883
|
format: date-time
|
|
22867
22884
|
description: Time at which entry was created.
|
|
22885
|
+
read_only:
|
|
22886
|
+
type: boolean
|
|
22887
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
22868
22888
|
pod_id:
|
|
22869
22889
|
type: string
|
|
22870
22890
|
description: ID of pod.
|
|
@@ -23183,6 +23203,9 @@ components:
|
|
|
23183
23203
|
type: string
|
|
23184
23204
|
format: date-time
|
|
23185
23205
|
description: Time at which entry was created.
|
|
23206
|
+
read_only:
|
|
23207
|
+
type: boolean
|
|
23208
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
23186
23209
|
pod_id:
|
|
23187
23210
|
type: string
|
|
23188
23211
|
description: ID of pod.
|
|
@@ -34327,6 +34350,9 @@ components:
|
|
|
34327
34350
|
type: string
|
|
34328
34351
|
format: date-time
|
|
34329
34352
|
description: Time at which entry was created.
|
|
34353
|
+
read_only:
|
|
34354
|
+
type: boolean
|
|
34355
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
34330
34356
|
required:
|
|
34331
34357
|
- entry
|
|
34332
34358
|
- organization_id
|
|
@@ -34614,6 +34640,9 @@ components:
|
|
|
34614
34640
|
type: string
|
|
34615
34641
|
format: date-time
|
|
34616
34642
|
description: Time at which entry was created.
|
|
34643
|
+
read_only:
|
|
34644
|
+
type: boolean
|
|
34645
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
34617
34646
|
required:
|
|
34618
34647
|
- entry
|
|
34619
34648
|
- organization_id
|
|
@@ -34915,6 +34944,9 @@ components:
|
|
|
34915
34944
|
type: string
|
|
34916
34945
|
format: date-time
|
|
34917
34946
|
description: Time at which entry was created.
|
|
34947
|
+
read_only:
|
|
34948
|
+
type: boolean
|
|
34949
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
34918
34950
|
required:
|
|
34919
34951
|
- entry
|
|
34920
34952
|
- organization_id
|
|
@@ -44405,6 +44437,9 @@ components:
|
|
|
44405
44437
|
type: string
|
|
44406
44438
|
format: date-time
|
|
44407
44439
|
description: Time at which entry was created.
|
|
44440
|
+
read_only:
|
|
44441
|
+
type: boolean
|
|
44442
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
44408
44443
|
pod_id:
|
|
44409
44444
|
type: string
|
|
44410
44445
|
description: ID of pod.
|
|
@@ -44709,6 +44744,9 @@ components:
|
|
|
44709
44744
|
type: string
|
|
44710
44745
|
format: date-time
|
|
44711
44746
|
description: Time at which entry was created.
|
|
44747
|
+
read_only:
|
|
44748
|
+
type: boolean
|
|
44749
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
44712
44750
|
pod_id:
|
|
44713
44751
|
type: string
|
|
44714
44752
|
description: ID of pod.
|
|
@@ -45027,6 +45065,9 @@ components:
|
|
|
45027
45065
|
type: string
|
|
45028
45066
|
format: date-time
|
|
45029
45067
|
description: Time at which entry was created.
|
|
45068
|
+
read_only:
|
|
45069
|
+
type: boolean
|
|
45070
|
+
description: Whether the entry is read-only and cannot be deleted via the API.
|
|
45030
45071
|
pod_id:
|
|
45031
45072
|
type: string
|
|
45032
45073
|
description: ID of pod.
|