如何解决Goddady企业邮箱24小时发送限额超出问题?
问题:Godaddy企业邮箱SMTP发送单日25封限制触发EENVELOPE错误
我用React+Node.js开发的联系表单已完成前后端开发,单日可正常发送25封邮件,但超出后会触发以下EENVELOPE错误:
error: {code: "EENVELOPE",…}
code: "EENVELOPE"
command: "MAIL FROM"
response: "550 User nermine.maxxx@xxxheia-sxxxos.xxx has exceeded its 24-hour sending limit. Messages to 25 recipients out of 25 allowed have been sent. Relay quota will reset in 7.82 hours."
responseCode: 550
sent: false
该邮箱是Outlook托管的Godaddy企业邮箱,网页端发送邮件正常,但仅联系表单通过SMTP发送受限。已咨询Godaddy客服未获有效解答,Node.js端源码如下:
const nodemailer = require("nodemailer"); exports.sendEmail = (req, res) => { const { name, email, message } = req.body; const transporter = nodemailer.createTransport({ host: "smtpout.secureserver.net", port: 465, secure: true, auth: { user: "nesss.ssssrem@assssia-ssss.ssss", pass: "xxxxxx", }, tls: { rejectUnauthorized: false, }, }); const messageHtml = `<div>This is a request sent from the website xxxxx</div><br/><div>${message}</div><br/><div>This is ${name} sending a request from xxxxxxx</div>`; const mailOptions = { from: "xxxxxxx.xxxxx@xxxxx-xxxxx.xxx", to: "xxxxxxx.xxxxx@xxxxx-xxxxx.xxx", subject: "Sending Email From Nermine", html: messageHtml, }; transporter.sendMail(mailOptions, function (error, info) { if (error) { console.log(error); res.status(500).send({ sent: false, error: error }); } else { console.log("Email sent: " + info.response); res.status(200).send({ sent: true, result: info.response }); } }); };
解决方向:
调整SMTP中继配额
Godaddy的SMTP中继配额与网页端发送配额是分开计算的,网页端不受限不代表SMTP配额相同。需再次联系Godaddy客服,明确提出调整SMTP中继的每日发送限额,或确认企业邮箱套餐是否有更高配额的SMTP服务选项。改用邮件发送API
若SMTP配额无法调整,可尝试使用Godaddy提供的邮件发送API替代SMTP,部分企业邮箱套餐的API发送配额与网页端一致,或更高。优化表单邮件发送逻辑
- 批量发送:收集一定时间内的多条表单提交信息,合并为一封邮件发送,减少每日发送的邮件总数。
- 前端限流:在React端添加限制,比如同一IP每日最多提交3次,既避免触发配额限制,也能防止恶意提交。
- 修正SMTP配置安全问题
移除代码中tls.rejectUnauthorized: false的配置,该设置会跳过TLS证书验证,存在安全风险。同时确保mailOptions.from地址与SMTP认证的user地址完全一致,部分邮箱服务商要求发件人必须与认证账号匹配,否则可能额外消耗配额或触发限制。
内容的提问来源于stack exchange,提问作者Adeno
相关产品推荐
相关产品推荐

