Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 错误:无法满足该请求_Amazon Web Services_Amazon Cloudfront_Nodemailer - Fatal编程技术网

Amazon web services 错误:无法满足该请求

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',

我正在努力向aws elastic beanstalk上托管的服务器发送电子邮件,使用cloudfront提供的证书,我正在使用NodeEmailr发送电子邮件,它在我的本地环境中工作,但部署到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'}
} 
来自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:代码在本地计算机上运行良好