imap-smtp-email

Automate email retrieval and sending via IMAP/SMTP with Node.js scripts.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/menhulu233/gearlai --skill imap-smtp-email-menhulu233
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: imap-smtp-email
Source: https://github.com/menhulu233/gearlai/tree/main/SKILLs/imap-smtp-email
Command: npx skills add https://github.com/menhulu233/gearlai --skill imap-smtp-email-menhulu233

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dotenv, imap, imap-simple, mailparser, nodemailer, and includes scripts (resource) components.

What problem does it solve?

Read, search, and send email via IMAP/SMTP programmatically to automate everyday email tasks and integrate with agents.

Core Features & Use Cases

  • Read and search emails across IMAP mailboxes, with support for unseen filters and subject/from queries.
  • Fetch full message content and attachments for downstream processing.
  • Send emails via SMTP with plain text or HTML content and optional attachments, with support for multiple recipients and CC/BCC.
  • Works with common providers (Gmail, Outlook, 163.com, 126.com, and more) and integrates into CLI or automated workflows.

Quick Start

Run node scripts/imap.js check to inspect recent inbox messages, then run node scripts/smtp.js test to verify SMTP connectivity.

Frequently Asked Questions about imap-smtp-email

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate reading and sending emails via IMAP and SMTP using Node.js?

You can automate email retrieval and sending via IMAP and SMTP using Node.js scripts. This approach allows you to check new messages, fetch content, search mailboxes, and send messages with attachments across providers like Gmail and Outlook.

Can I send emails with attachments and multiple recipients via SMTP?

Yes, sending emails via SMTP supports plain text or HTML content with optional attachments. You can include multiple recipients and use CC or BCC fields for automated workflow messaging.

Does IMAP email automation work with providers like Gmail, Outlook, and 163.com?

IMAP and SMTP email automation works with common providers including Gmail, Outlook, 163.com, and 126.com. It supports environment-based configuration loading and secure credential handling for these services.

How do I search for unseen messages and fetch attachments from an IMAP mailbox?

You can search IMAP mailboxes using unseen filters and subject or sender queries. Fetching full message content and attachments from these results allows downstream processing within your automated workflows.

What's the best way to integrate automated email sending into a CLI workflow?

Integrating email automation into CLI workflows is done using Node.js scripts. You run commands to inspect inbox messages and verify SMTP connectivity, enabling end-to-end email automation directly from the command line.

Why do I need environment-based configuration for secure email credential handling?

Environment-based configuration is needed for secure email credential handling to protect sensitive login information. Using dotenv loads your IMAP and SMTP credentials safely without hardcoding them into your automation scripts.