gpt4 book ai didi

amazon-web-services - 使用 AWS SES SMTP-错误 554 消息被拒绝 : Email address is not verified. 以下身份未通过区域 checkin

转载 作者:行者123 更新时间:2023-12-03 20:17:18 30 4
gpt4 key购买 nike

在我尝试发送电子邮件的电子邮件地址上收到此错误!

不知道为什么我需要验证我发送的不属于我的电子邮件?

调试 SMTP:发送时出现 MessagingException,抛出:
com.sun.mail.smtp.SMTPSendFailedException:554 邮件被拒绝:电子邮件地址未验证。以下身份未能通过 EU-WEST-1 区域的检查:danielhaughton@outlook.com

@Configuration
@PropertySource("app.properties")
@EnableTransactionManagement
public class AppConfig {
@Autowired
private Environment env;
@Bean
public JavaMailSender getJavaMailSender() {
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
mailSender.setHost("email-smtp.eu-west-1.amazonaws.com");
mailSender.setPort(25);
mailSender.setUsername("removedcreds");
mailSender.setPassword("removed creds");
Properties props = mailSender.getJavaMailProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.starttls.required", "true");

props.put("mail.debug", "true");
return mailSender;
}

电子邮件服务
@零件
公共(public)类 EmailServiceImpl {
@Autowired
public JavaMailSender emailSender;

public void sendSimpleMessage(String toAddress, String subject, String text)
{
SimpleMailMessage message = new SimpleMailMessage();
message.setTo(toAddress);
message.setFrom("noreply@mydomain.com");
message.setSubject(subject);
message.setText(text);
emailSender.send(message);
}
}

我的 emailserviceimpl 自动连接到我从中发送电子邮件的 Web Controller 中

最佳答案

默认情况下,您的 AWS 账户的 SES 功能是沙盒的,并且在 SES 沙盒中具有某些限制。

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html

To help protect our customers from fraud and abuse and to help you establish your trustworthiness to ISPs and email recipients, we do not immediately grant unlimited Amazon SES usage to new users. New users are initially placed in the Amazon SES sandbox. In the sandbox, you have full access to all Amazon SES email-sending methods and features so that you can test and evaluate the service; however, the following restrictions are in effect:

You can only send mail to the Amazon SES mailbox simulator and to verified email addresses and domains.

You can only send mail from verified email addresses and domains.

You can send a maximum of 200 messages per 24-hour period.

Amazon SES can accept a maximum of one message from your account per second.



请参阅此博客文章,其中概述了退出沙盒的步骤。
https://aws.amazon.com/blogs/ses/ses-limit-increase-form-consolidation/

关于amazon-web-services - 使用 AWS SES SMTP-错误 554 消息被拒绝 : Email address is not verified. 以下身份未通过区域 checkin ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49125878/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com