Gmail api 如何使用datetime发送创建电子邮件(稍后发送/计划发送)

Gmail api 如何使用datetime发送创建电子邮件(稍后发送/计划发送),gmail-api,google-api-java-client,Gmail Api,Google Api Java Client,所以我使用的是gmail java api 它提供添加自定义标题或添加带有setCentDate的Date标题 可悲的是,我尝试过的每一个标题都被忽略了,邮件被立即发送 上面提到的方法是这样的 /** * Set the RFC 822 "Date" header field. This is the date on which the * creator of the message indicates that the message is complete

所以我使用的是gmail java api

它提供添加自定义标题或添加带有
setCentDate
Date
标题

可悲的是,我尝试过的每一个标题都被忽略了,邮件被立即发送

上面提到的方法是这样的

    /**
     * Set the RFC 822 "Date" header field. This is the date on which the
     * creator of the message indicates that the message is complete
     * and ready for delivery. If the date parameter is 
     * <code>null</code>, the existing "Date" field is removed.
     *
     * @exception   IllegalWriteException if the underlying
     *          implementation does not support modification
     * @exception   IllegalStateException if this message is
     *          obtained from a READ_ONLY folder.
     * @exception   MessagingException for other failures
     */
    public void setSentDate(Date d) throws MessagingException {
因此,它应该与该函数一起工作,但不能

如何强制gmail在指定日期发送邮件


或者它可能是一个被忽略的
日期
标题的bug?

看看,它为您提供了一个谷歌应用程序脚本解决方案,这是一个可接受的解决方案吗?@AMolina hi and thx,但不,我需要电子邮件从一开始就存在于gmail中,所以如果有人在我这边创建了一封预定的电子邮件,他应该立即在gmail的预定文件夹中找到它。你认为我应该为此制造一个问题吗?