imap-smtp-email

Read and send emails with attachments via IMAP and SMTP from a Node.js CLI.

869|203|Updated May 7, 2026
One-click install
npx skills add https://github.com/freestylefly/wesight --skill imap-smtp-email-freestylefly
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: imap-smtp-email
Source: https://github.com/freestylefly/wesight/tree/main/SKILLs/imap-smtp-email
Command: npx skills add https://github.com/freestylefly/wesight --skill imap-smtp-email-freestylefly

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Managing emails across IMAP and SMTP servers from a local CLI can be cumbersome, making it hard to read messages, fetch content, attach files, and send messages programmatically.

Core Features & Use Cases

  • Read and fetch email bodies and metadata from IMAP servers, including attachments.
  • Send emails via SMTP with plain text, HTML content, and attachments, all from a script or terminal.
  • Search mailboxes, mark messages as read/unread, and download attachments for archival or processing.

Quick Start

Run the CLI to check your inbox and send a test email from the command line.

Frequently Asked Questions about imap-smtp-email

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

FAQPage Schema
How do I read and send emails from the command line using IMAP and SMTP?

You can read and send emails from the command line by running a Node.js CLI script that connects to IMAP and SMTP servers. This allows you to fetch messages, search mailboxes, and send emails with attachments directly from your terminal.

Can I download email attachments using a Node.js CLI script?

Yes, you can download email attachments using a Node.js CLI script. The tool parses IMAP messages and extracts attachments, allowing you to save files locally for archival or further processing directly from your terminal.

What is the best way to programmatically search mailboxes and fetch message bodies?

The best way to programmatically search mailboxes and fetch message bodies is using a Node.js CLI integrated with IMAP libraries. It queries the server, retrieves matching email metadata and content, and supports marking messages as read or unread.

Does this Node.js email tool support sending HTML content and file attachments via SMTP?

Yes, this Node.js email tool supports sending HTML content and file attachments via SMTP. It utilizes the nodemailer dependency to deliver plain text, HTML, and attached files from your local CLI to specified recipients.

Do I need to configure environment variables to manage emails via IMAP and SMTP?

Yes, you need to configure environment variables to manage emails via IMAP and SMTP. The script relies on the dotenv dependency to load server credentials and connection settings securely before executing email operations.

Why does fetching emails via IMAP fail when using a local CLI script?

Fetching emails via IMAP fails when environment variables are missing or server credentials are incorrect. The CLI includes robust error handling, but successful connections require valid IMAP server settings loaded through dotenv before execution.