gpt4 book ai didi

grails - 电子邮件地址未在Grails中经过验证的Amazon SES

转载 作者:行者123 更新时间:2023-12-02 16:01:25 24 4
gpt4 key购买 nike

我已经配置了Amazon SES,但是无法发送电子邮件。我收到未验证电子邮件的错误,但无法完成,因为该电子邮件在我拥有的另一个应用程序中运行正常。

这是错误:

| Error com.amazonaws.services.simpleemail.model.MessageRejectedException: Email address is not verified. (Service: AmazonSimpleEmailService; Status Code: 400; Error Code: MessageRejected; Request ID: 6aab74bb-03c5-11e5-b255-e9ec5d4974cf)
| Error at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1160)
| Error at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:748)
| Error at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:467)
| Error at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:302)
| Error at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.invoke(AmazonSimpleEmailServiceClient.java:1443)
| Error at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.sendEmail(AmazonSimpleEmailServiceClient.java:1170)
| Error at com.amazonaws.services.simpleemail.AmazonSimpleEmailService$sendEmail$2.call(Unknown Source)
| Error at org.hscp.email.sender.plugin.SendEmailController.mail(SendEmailController.groovy:44)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error at java.lang.reflect.Method.invoke(Method.java:606)
| Error at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:154)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:375)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:252)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:205)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:126)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
| Error at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
| Error at org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:347)
| Error at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
| Error at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
| Error at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
| Error at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
| Error at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
| Error at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
| Error at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
| Error at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
| Error at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
| Error at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
| Error at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
| Error at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
| Error at org.codehaus.groovy.grails.web.mapping.UrlMappingUtils.forwardRequestForUrlMappingInfo(UrlMappingUtils.java:178)
| Error at org.codehaus.groovy.grails.web.mapping.UrlMappingUtils.forwardRequestForUrlMappingInfo(UrlMappingUtils.java:144)
| Error at org.codehaus.groovy.grails.web.mapping.UrlMappingUtils.forwardRequestForUrlMappingInfo(UrlMappingUtils.java:135)
| Error at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:216)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
| Error at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
| Error at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
| Error at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
| Error at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
| Error at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
| Error at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
| Error at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
| Error at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
| Error at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
| Error at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
| Error at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
| Error at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| Error at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
| Error at java.lang.Thread.run(Thread.java:745)
| Error 2015-05-26 17:36:54,191 [http-bio-8080-exec-2] ERROR plugin.SendEmailController - null

这是我的 Controller 。
def mail(){
try{
log.info "Sending email"
String source = 'myEmail'
Destination destination = new Destination(['YourEmail'])
Content subject = new Content('test')
Body body = new Body().withHtml(new Content('''Hi,<br />
<br />
Some <b>HTML</b> body…
'''))
Message message = new Message(subject, body)
amazonWebService.ses.sendEmail(new SendEmailRequest(source, destination, message))
}
catch (Exception e){
log.error e.printStackTrace()
}
}

这是我安装的插件: runtime ':aws-sdk:1.9.37.1'
这是我添加Amazon SES时的Config.groovy
environments {
development {
grails.logging.jul.usebridge = true
grails.plugin.awssdk.accessKey = '....'
grails.plugin.awssdk.secretKey = '....'
}

production {
grails.logging.jul.usebridge = false
grails.plugin.awssdk.accessKey = '...'
grails.plugin.awssdk.secretKey = '...'
}
}

grails.plugin.awssdk.region = 'eu-west-1'

最佳答案

您不能简单地调用验证操作,然后立即使用希望被验证的电子邮件地址。验证操作所做的所有操作都是将带有唯一链接的验证电子邮件发送到有问题的地址,然后收件人必须访问该链接才能完成验证过程,然后才能将地址​​用于SES。

关于grails - 电子邮件地址未在Grails中经过验证的Amazon SES,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30464541/

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