使用专用邮箱发送工作邮件。
配置项值SMTP服务器smtp.exmail.qq.comSMTP端口465 (SSL)邮箱账号YOUR_EMAIL@YOUR_DOMAIN.COM凭证文件~/.openclaw/workspace/memory/sc-email-credentials.enc
python
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
SMTP_SERVER = "smtp.exmail.qq.com"
SMTP_USER = "YOUR_EMAIL@YOUR_DOMAIN.COM"
SMTP_PASSWORD = "YOUR_PASSWORD"
msg = MIMEMultipart()
msg['From'] = SMTP_USER
msg['To'] = "recipient@example.com"
msg['Subject'] = "邮件主题"
msg.attach(MIMEText("邮件内容", 'plain', 'utf-8'))
server = smtplib.SMTP_SSL('smtp.exmail.qq.com', 465)
server.login(SMTP_USER, SMTP_PASSWORD)
server.sendmail(SMTP_USER, ["recipient@example.com"], msg.as_string())
server.quit()
python
# 读取会议纪要文件
with open("meeting-minutes.md", 'r') as f:
content = f.read()
# 发送邮件
send_email(
to=["colleague@example.com"],
subject="会议纪要 - 日期",
body=content
)
bash
# 直接使用Python脚本发送
python3 scripts/send-email.py --to "xxx@example.com" --subject "主题" --body "内容"
base64 -d ~/.openclaw/workspace/memory/sc-email-credentials.enc当用户提到以下内容时激活此Skill: