email-smtp-send by tiangong-ai/skills
npx skills add https://github.com/tiangong-ai/skills --skill email-smtp-sendreferences/env.md 和 assets/config.example.env)。imapclient。python3 scripts/smtp_send.py check-config
python3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "SMTP test" \
--body "Hello from email-smtp-send"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
python3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "Package delivery" \
--body "See attachments." \
--attach ./report.pdf \
--attach ./appendix.xlsx
python3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "Synced send" \
--body "This message will be appended to Sent Items." \
--sync-sent \
--sent-mailbox "Sent Items"
check-config 打印经过清理的 SMTP 配置 + 默认值 + 已发送邮件同步配置 JSON。send 成功时打印一个 type=status JSON 对象,包含:
event=smtp_sentmessage_idattachment_count 和 attachments[] 元数据sent_sync 对象,包含 enabled、required、appended 以及同步元数据/错误send 失败时向 stderr 打印 type=error JSON,错误类型为以下之一:
event=smtp_send_invalid_argsevent=smtp_send_failedevent=smtp_sent_sync_failed(仅当同步为必需且同步失败时)send --to:必需的收件人,可重复指定或以逗号分隔。send --cc:可选的抄送收件人。send --bcc:可选的密送收件人。send --subject:可选的主题(默认为环境变量值)。send --body:可选的正文(默认为环境变量值)。send --content-type:plain 或 html。send --from:可选的发件人覆盖。send --attach:可选的本地附件路径,可重复指定或以逗号分隔。send --max-attachment-bytes:每个附件允许的最大字节数。send --message-id:可选的 Message-ID 头。send --in-reply-to:可选的 In-Reply-To 头。send --references:可选的 References 头。send --sync-sent|--no-sync-sent:为此次发送强制启用/禁用 IMAP 已发送邮件同步。send --sent-mailbox:覆盖已发送邮箱。send --sent-flags:IMAP APPEND 标志,逗号分隔(默认为 \Seen)。send --sent-sync-required:如果 SMTP 成功但已发送邮件同步失败,则返回非零值。环境变量默认值:
SMTP_HOST、SMTP_PORT、SMTP_SSL、SMTP_STARTTLSSMTP_USERNAME、SMTP_PASSWORD、SMTP_FROM、SMTP_CONNECT_TIMEOUTSMTP_SUBJECT、SMTP_BODY、SMTP_CONTENT_TYPESMTP_MAX_ATTACHMENT_BYTESSMTP_SYNC_SENT、SMTP_SYNC_SENT_REQUIREDSMTP_SENT_IMAP_HOST、SMTP_SENT_IMAP_PORT、SMTP_SENT_IMAP_SSLSMTP_SENT_IMAP_USERNAME、SMTP_SENT_IMAP_PASSWORDSMTP_SENT_IMAP_MAILBOX、SMTP_SENT_IMAP_FLAGS、SMTP_SENT_IMAP_CONNECT_TIMEOUTIMAP_HOST、IMAP_PORT、IMAP_SSL、IMAP_USERNAME、IMAP_PASSWORD、IMAP_CONNECT_TIMEOUTimapclient:python3 -m pip install imapclient
2 退出。1 退出。--sent-sync-required 或 SMTP_SYNC_SENT_REQUIRED=true),同步失败以代码 1 退出。references/env.mdassets/config.example.envscripts/smtp_send.py每周安装次数
220
代码仓库
GitHub 星标数
4
首次出现
2026年2月23日
安全审计
安装于
cline218
github-copilot218
codex218
opencode218
kimi-cli217
gemini-cli217
references/env.md and assets/config.example.env).imapclient when sync is enabled.python3 scripts/smtp_send.py check-config
python3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "SMTP test" \
--body "Hello from email-smtp-send"
5. Send with attachments:
python3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "Package delivery" \
--body "See attachments." \
--attach ./report.pdf \
--attach ./appendix.xlsx
6. Send and sync to sent mailbox:
python3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "Synced send" \
--body "This message will be appended to Sent Items." \
--sync-sent \
--sent-mailbox "Sent Items"
check-config prints sanitized SMTP config + defaults + sent-sync config JSON.send success prints one type=status JSON object containing:
event=smtp_sentmessage_idattachment_count and attachments[] metadatasent_sync object with enabled, required, , and sync metadata/errorsend --to: required recipient, repeatable or comma-separated.send --cc: optional CC recipients.send --bcc: optional BCC recipients.send --subject: optional subject (defaults from env).send --body: optional body (defaults from env).send --content-type: plain or html.send --from: optional sender override.send --attach: optional local attachment path, repeatable or comma-separated.Environment defaults:
SMTP_HOST, SMTP_PORT, SMTP_SSL, SMTP_STARTTLSSMTP_USERNAME, SMTP_PASSWORD, SMTP_FROM, SMTP_CONNECT_TIMEOUTSMTP_SUBJECT, SMTP_BODY, SMTP_CONTENT_TYPESent-sync mode requires imapclient:
python3 -m pip install imapclient
2.1.--sent-sync-required or SMTP_SYNC_SENT_REQUIRED=true), sync failure exits with code 1.references/env.mdassets/config.example.envscripts/smtp_send.pyWeekly Installs
220
Repository
GitHub Stars
4
First Seen
Feb 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
cline218
github-copilot218
codex218
opencode218
kimi-cli217
gemini-cli217
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
147,400 周安装
appendedsend failures print type=error JSON to stderr with one of:
event=smtp_send_invalid_argsevent=smtp_send_failedevent=smtp_sent_sync_failed (only when sync is required and sync fails)send --max-attachment-bytes: max bytes allowed per attachment.send --message-id: optional Message-ID header.send --in-reply-to: optional In-Reply-To header.send --references: optional References header.send --sync-sent|--no-sync-sent: force-enable/disable IMAP sent sync for this send.send --sent-mailbox: override sent mailbox.send --sent-flags: IMAP APPEND flags, comma-separated (default \Seen).send --sent-sync-required: return non-zero if SMTP succeeds but sent sync fails.SMTP_MAX_ATTACHMENT_BYTESSMTP_SYNC_SENT, SMTP_SYNC_SENT_REQUIREDSMTP_SENT_IMAP_HOST, SMTP_SENT_IMAP_PORT, SMTP_SENT_IMAP_SSLSMTP_SENT_IMAP_USERNAME, SMTP_SENT_IMAP_PASSWORDSMTP_SENT_IMAP_MAILBOX, SMTP_SENT_IMAP_FLAGS, SMTP_SENT_IMAP_CONNECT_TIMEOUTIMAP_HOST, IMAP_PORT, IMAP_SSL, IMAP_USERNAME, IMAP_PASSWORD, IMAP_CONNECT_TIMEOUT