AppEngine电子邮件:未经授权的发件人

Fel*_*lgo 9 java email google-app-engine

当我尝试发送邮件时,我收到"未授权发件人"例外

javax.mail.SendFailedException:在javax.mail的javax.mail.Transport.send(Transport.java:163)发送失败(javax.mail.MessagingException:非法参数(java.lang.IllegalArgumentException:未经授权的发件人:未授权的发件人)) .Transport.send(Transport.java:48)

我发送邮件的代码非常简单:

Session session = Session.getDefaultInstance(new Properties(), null);
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress("admingae@tecurti.com", "Adming"));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress("name@gmail.com", "Felipe"));
msg.setSubject("Assunto", "UTF-8");
msg.setText("texto corpo");
Transport.send(msg);
Run Code Online (Sandbox Code Playgroud)

我已经在管理控制台上给admingae@tecurti.com"所有者"权限.

这是我的App Engine控制台权限

如果有人能帮助我,我表示赞赏

谢谢


解决方案感谢Andrei Volgin我会注册解决方案

管理控制台正确注册

And*_*gin 13

在控制台中,转到App Engine>设置>应用程序设置.将此电子邮件地址添加到授权发件人列表中.