email-service-integration by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill email-service-integration通过集成 SMTP、第三方电子邮件提供商(SendGrid、Mailgun、AWS SES)、HTML 模板、电子邮件验证、重试机制以及适当的错误处理,构建全面的电子邮件系统。
最小化工作示例:
# config.py
import os
class EmailConfig:
MAIL_SERVER = os.getenv('MAIL_SERVER', 'smtp.gmail.com')
MAIL_PORT = int(os.getenv('MAIL_PORT', 587))
MAIL_USE_TLS = os.getenv('MAIL_USE_TLS', True)
MAIL_USERNAME = os.getenv('MAIL_USERNAME')
MAIL_PASSWORD = os.getenv('MAIL_PASSWORD')
MAIL_DEFAULT_SENDER = os.getenv('MAIL_DEFAULT_SENDER', 'noreply@example.com')
# email_service.py
from flask_mail import Mail, Message
from flask import render_template_string
import logging
from datetime import datetime
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
logger = logging.getLogger(__name__)
mail = Mail()
class EmailService:
def __init__(self, app=None):
// ... (完整实现请参阅参考指南)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/ 目录下的详细实现:
| 指南 | 内容 |
|---|---|
| Python/Flask with SMTP | Python/Flask 与 SMTP |
| Node.js with SendGrid | Node.js 与 SendGrid |
| Email Templates with Mjml | 使用 Mjml 的电子邮件模板 |
| FastAPI Email with Background Tasks | 带后台任务的 FastAPI 电子邮件 |
| Email Validation and Verification | 电子邮件验证与校验 |
每周安装量
133
代码仓库
GitHub 星标数
141
首次出现
Jan 21, 2026
安全审计
安装于
gemini-cli108
opencode108
codex104
cursor101
claude-code96
github-copilot92
Build comprehensive email systems with SMTP integration, third-party email providers (SendGrid, Mailgun, AWS SES), HTML templates, email validation, retry mechanisms, and proper error handling.
Minimal working example:
# config.py
import os
class EmailConfig:
MAIL_SERVER = os.getenv('MAIL_SERVER', 'smtp.gmail.com')
MAIL_PORT = int(os.getenv('MAIL_PORT', 587))
MAIL_USE_TLS = os.getenv('MAIL_USE_TLS', True)
MAIL_USERNAME = os.getenv('MAIL_USERNAME')
MAIL_PASSWORD = os.getenv('MAIL_PASSWORD')
MAIL_DEFAULT_SENDER = os.getenv('MAIL_DEFAULT_SENDER', 'noreply@example.com')
# email_service.py
from flask_mail import Mail, Message
from flask import render_template_string
import logging
from datetime import datetime
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
logger = logging.getLogger(__name__)
mail = Mail()
class EmailService:
def __init__(self, app=None):
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Python/Flask with SMTP | Python/Flask with SMTP |
| Node.js with SendGrid | Node.js with SendGrid |
| Email Templates with Mjml | Email Templates with Mjml |
| FastAPI Email with Background Tasks | FastAPI Email with Background Tasks |
| Email Validation and Verification | Email Validation and Verification |
Weekly Installs
133
Repository
GitHub Stars
141
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli108
opencode108
codex104
cursor101
claude-code96
github-copilot92
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
157,400 周安装