Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 谷歌应用程序迁移API批处理不';t发送/插入电子邮件_Java_Google App Engine_Gwt_Google Email Migration - Fatal编程技术网

Java 谷歌应用程序迁移API批处理不';t发送/插入电子邮件

Java 谷歌应用程序迁移API批处理不';t发送/插入电子邮件,java,google-app-engine,gwt,google-email-migration,Java,Google App Engine,Gwt,Google Email Migration,我正在尝试使用Google Apps Migration API v.1发送电子邮件,但是我没有发送它们,代码也没有抛出任何异常或错误。 这是我的密码: MailItemService mailItemService = new MailItemService("exampleCo-exampleApp-1"); mailItemService.setUserCredentials("user","password"); MailItemEntry entry =

我正在尝试使用Google Apps Migration API v.1发送电子邮件,但是我没有发送它们,代码也没有抛出任何异常或错误。 这是我的密码:

    MailItemService   mailItemService = new MailItemService("exampleCo-exampleApp-1");
    mailItemService.setUserCredentials("user","password");

    MailItemEntry entry = new MailItemEntry();
    Rfc822MediaSource mediaSource = new Rfc822MediaSource(mail.getInputStream().toString());
    entry.setMediaSource(mediaSource);
    entry.addMailProperty(MailItemProperty.STARRED);
    entry.addMailProperty(MailItemProperty.UNREAD);
    entry.addLabel(new Label("pruebas"));
    MailItemFeed feed = new MailItemFeed();
    for (int i = 0; i < mailItems.size(); i++) {
         BatchUtils.setBatchId(mailItems.get(i), Integer.toString(i));
         feed.getEntries().add(mailItems.get(i));
   }
   mailItemService.batch("domain", "destinationUser", feed);
MailItemService MailItemService=newmailitemservice(“exampleCo-exampleApp-1”);
setUserCredentials(“用户”、“密码”);
MailItemEntry=新的MailItemEntry();
Rfc822MediaSource mediaSource=新的Rfc822MediaSource(mail.getInputStream().toString());
entry.setMediaSource(mediaSource);
entry.addMailProperty(MailItemProperty.STARRED);
entry.addMailProperty(MailItemProperty.UNREAD);
条目。添加标签(新标签(“pruebas”);
MailItemFeed=新的MailItemFeed();
对于(int i=0;i
你能定义一下“发送”是什么意思吗?除了将旧邮件迁移到邮箱(例如,不允许执行常规的新邮件邮箱插入)之外,将其用于任何其他用途都是违反API ToS的。如果您试图向邮箱发送新邮件,请使用

杰伊