Amazon web services 错误:无法满足该请求
我正在努力向aws elastic beanstalk上托管的服务器发送电子邮件,使用cloudfront提供的证书,我正在使用NodeEmailr发送电子邮件,它在我的本地环境中工作,但部署到aws后失败 电子邮件代码:Amazon web services 错误:无法满足该请求,amazon-web-services,amazon-cloudfront,nodemailer,Amazon Web Services,Amazon Cloudfront,Nodemailer,我正在努力向aws elastic beanstalk上托管的服务器发送电子邮件,使用cloudfront提供的证书,我正在使用NodeEmailr发送电子邮件,它在我的本地环境中工作,但部署到aws后失败 电子邮件代码: const transporter = nodemailer.createTransport({ host: 'mail.email.co.za', port: 587, auth: { user: 'example@email.co.za',
const transporter = nodemailer.createTransport({
host: 'mail.email.co.za',
port: 587,
auth: {
user: 'example@email.co.za',
pass: 'email@22'
},
secure:false,
tls: {rejectUnauthorized: false},
debug:true
});
const mailOptions = {
from: 'example@email.co.za',
to: email,
subject: 'Password Reset OTP' ,
text: `${OTP}`
}
try {
const response = await transporter.sendMail(mailOptions)
return {error:false, message:'OTP successfully sent' , response}
}catch(e) {
return {error:false, message:'Problems sending OTP, Please try again'}
}
来自AWS的错误:
const transporter = nodemailer.createTransport({
host: 'mail.email.co.za',
port: 587,
auth: {
user: 'example@email.co.za',
pass: 'email@22'
},
secure:false,
tls: {rejectUnauthorized: false},
debug:true
});
const mailOptions = {
from: 'example@email.co.za',
to: email,
subject: 'Password Reset OTP' ,
text: `${OTP}`
}
try {
const response = await transporter.sendMail(mailOptions)
return {error:false, message:'OTP successfully sent' , response}
}catch(e) {
return {error:false, message:'Problems sending OTP, Please try again'}
}
这项要求未能得到满足
504错误无法满足请求CloudFront尝试
与源建立连接,但
尝试失败或源站关闭了连接
NB:代码在本地计算机上运行良好