2011-08-23 52 views
0

在GAE中发送电子邮件时出现以下错误。这突然停止了工作。有人可以帮助我理解问题的出现位置,或者任何调试想法都会被理解。正如你从附图中看到的,我很喜欢我的配额。MailService IO失败(java.io.IOException:内部错误)

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("[email protected]")); 
      msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to.getEmail())); 
      msg.addRecipient(Message.RecipientType.CC, new InternetAddress("[email protected]")); 
      msg.addRecipient(Message.RecipientType.CC, new InternetAddress("[email protected]")); 

      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; 
    } 

enter image description here

+0

您是否检查仪表板日志?有什么吗? – maneesh

+0

仪表板页面或管理日志中没有什么特别的东西 –

+0

只是想一想:您是否可能从应用程序管理员列表中删除了[email protected]帐户? – maneesh

回答

0

我遇到了一模一样的问题今晚。经过一番调查,我发现这个GAE问题:http://code.google.com/p/googleappengine/issues/detail?id=5776,这表明GAE实例ID不应与发件人电子邮件ID相同。例如,在“abcd.appspot.com”中,当发件人ID是“[email protected]”时,它将无法发送电子邮件。

我还没有尝试过,但我确定我在我的错误情况下使用了相同的ID。我会明天测试它,并更新这篇文章,介绍它的工作与否。

感谢, Ĵ


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

我尝试过,但还是有问题,所以我发表的评论下面GAE问题:

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

+0

刚刚看到一篇文章提到“由于开票未打开而导致此类问题”。 https://groups.google.com/forum/#!topic/google-appengine/tSl6D_cgrbs –

+0

我再次检查了该函数,它今天工作。斯坦格,我没有做任何事情。 –

相关问题