Skip to content

Email

Human can send and receive email via SMTP and IMAP. Messages are sent using curl over SMTP (TLS), and received by polling the INBOX with IMAP SEARCH UNSEEN.

  • Build with -DHU_ENABLE_EMAIL=ON or -DHU_ENABLE_ALL_CHANNELS=ON
  • curl available in PATH (used for SMTP send and IMAP polling)
  • SMTP and IMAP credentials for your email provider

Add to ~/.human/config.json under channels.email:

{
"channels": {
"email": {
"smtp_host": "smtp.gmail.com",
"smtp_port": 587,
"from_address": "bot@gmail.com",
"smtp_user": "bot@gmail.com",
"smtp_pass": "your-app-password",
"imap_host": "imap.gmail.com",
"imap_port": 993
}
}
}
FieldTypeDescription
smtp_hoststringSMTP server hostname (required for send)
smtp_portnumberSMTP port (default 587 for STARTTLS, 465 for implicit)
from_addressstringSender address (required)
smtp_userstringSMTP username (often same as from_address)
smtp_passstringSMTP password or app password
imap_hoststringIMAP server hostname (required for receive)
imap_portnumberIMAP port (default 993 for IMAPS)

Gmail requires App Passwords when 2FA is enabled. Use an app password rather than your account password.

  • Human writes a MIME plain-text email to a temp file
  • Invokes curl with --url smtps://host:port (or smtp:// for non-TLS)
  • Sends via --mail-from, --mail-rcpt, --upload-file
  • Port 587 uses STARTTLS; port 465 uses implicit TLS
  • Polls IMAP every 30 seconds (SEARCH UNSEEN or UID SEARCH UNSEEN UID N:*)
  • Fetches headers (From, Subject) and body text per message
  • Uses sender address as session key; subject + body as content
  • Requires both imap_host and smtp_user/smtp_pass (IMAP uses same credentials)
  • Requires curl: The channel uses curl for both SMTP and IMAP. Ensure curl is installed and in PATH.
  • IMAP only: Receive uses IMAP; no POP3 support.
  • Single mailbox: Polls INBOX only; no configurable folder.
  • No attachments: Sends plain text only; attachments not supported.