Mailgentic

IMAP and SMTP

Every Mailgentic inbox is also a standard IMAP account and SMTP submission endpoint. Point Thunderbird, Apple Mail, mutt, fetchmail, imaplib or any mail library at it — no SDK, no HTTP.

Protocol Host Port Security
IMAP imap.mailgentic.ai 993 implicit TLS
IMAP imap.mailgentic.ai 143 STARTTLS
SMTP submission smtp.mailgentic.ai 465 implicit TLS
SMTP submission smtp.mailgentic.ai 587 STARTTLS

Clear-text login is refused before TLS on both protocols (LOGINDISABLED is advertised until STARTTLS completes).

Credentials

For an inbox (reading or sending as the agent): username is the inbox address, password is an API key — read scope for IMAP, send scope for SMTP. An inbox-scoped key is the natural choice: it can only touch that inbox.

For relay sending without an inbox: create a tenant SMTP credential (POST /v1/tenants/{id}/smtp-credentials) and use its username/password on smtp.mailgentic.ai.

IMAP

Folders map to IMAP mailboxes: INBOX, Sent, Drafts, Archive, Trash, Junk, plus any custom folder (nested with /). System names are case-insensitive.

import imaplib

im = imaplib.IMAP4_SSL("imap.mailgentic.ai", 993)
im.login("support@agents.mailgentic.ai", AGENT_KEY)   # inbox-scoped key
im.select("INBOX")
_, ids = im.search(None, "UNSEEN")
for uid in ids[0].split():
    _, data = im.fetch(uid, "(RFC822)")
    handle(data[0][1])
    im.store(uid, "+FLAGS", "\\Seen")

SMTP submission

import smtplib
from email.message import EmailMessage

msg = EmailMessage()
msg["From"] = "support@agents.mailgentic.ai"     # must equal the inbox address
msg["To"] = "customer@example.net"
msg["Subject"] = "Re: I need help"
msg.set_content("Thanks — we're on it.")

with smtplib.SMTP("smtp.mailgentic.ai", 587) as s:
    s.starttls()
    s.login("support@agents.mailgentic.ai", AGENT_KEY)
    s.send_message(msg)

Rules that apply to SMTP submission from an inbox:

Relay submissions with a tenant SMTP credential follow the same rules minus the inbox policy; the From domain must be registered and verified for the tenant.