【问题标题】:MailService IO failed (java.io.IOException: Internal error)MailService IO 失败(java.io.IOException:内部错误)
【发布时间】:2011-08-23 13:35:21
【问题描述】:

在 GAE 中发送电子邮件时出现以下错误。这突然停止工作。有人可以帮助我了解问题可能出在哪里,或者任何调试想法都会得到重视。正如您从所附图片中看到的那样,我的配额很好。

MailService IO 失败(java.io.IOException:内部错误)

public boolean email(final Player to, List<Player> players)
    {
        Properties props = new Properties();
        Session session = Session.getDefaultInstance(props, null);

        try
        {
            Message msg = new MimeMessage(session);
            msg.setFrom(new InternetAddress("validemail@gmail.com"));
            msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to.getEmail()));
            msg.addRecipient(Message.RecipientType.CC, new InternetAddress("arav@yahoo.com"));
            msg.addRecipient(Message.RecipientType.CC, new InternetAddress("validemail@gmail.com"));

            msg.setSubject("Registration confirmation.");

            msg.setText("tx for registering");
            logger.info("sending email to " + to.getEmail());
            logger.info(msgBody.toString());
            Transport.send(msg);
            logger.info("sent email to " + to.getEmail());
        }
        catch (AddressException e)
        {
            return false;
        }
        catch (MessagingException e)
        {
            return false;
        }
        return true;
    }

【问题讨论】:

  • 您检查了仪表板日志吗?有什么吗?
  • 在仪表板页面或管理日志中没有什么特别的
  • 只是大声思考:您是否从应用程序管理员列表中删除了 validemail@gmail.com 帐户?
  • 你能告诉我在哪里抢劫这个配置,以便我检查它。这最初是有效的,自从我开始尝试 GAE 以来,我没有接触任何配置。

标签: java google-app-engine gwt


【解决方案1】:

今晚我遇到了完全相同的问题。经过一番调查,我发现了这个 GAE 问题:http://code.google.com/p/googleappengine/issues/detail?id=5776,这表明 GAE 实例 ID 不应与发件人电子邮件 ID 相同。比如在“abcd.appspot.com”中,当发件人ID为“abcd@xxxx.com”时,会发送邮件失败。

我还没有尝试过,但我确定我在错误案例中使用了相同的 ID。我明天会测试它并更新这篇文章是否有效。

谢谢, J


更新 [2011 年 12 月 15 日 GMT+8]:

我试过了,但还是有问题,所以我将 cmets 发布到以下 GAE 问题:

http://code.google.com/p/googleappengine/issues/detail?id=5776 http://code.google.com/p/googleappengine/issues/detail?id=5320

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2016-10-24
  • 1970-01-01
  • 2018-04-06
  • 2018-10-08
  • 1970-01-01
  • 2012-06-08
  • 2016-05-31
  • 1970-01-01
相关资源
最近更新 更多