Scheduling a time in the future to send an email in Java or Python

后端 未结 6 1818
执笔经年
执笔经年 2021-01-27 05:11

I\'m writing an application and I\'d like it to somehow schedule an email to be sent at a later date (likely an hour after it is run). The programming language will be Python or

6条回答
  •  生来不讨喜
    2021-01-27 05:36

    You can build the actual email to send, using JavaMail (with attachments and all), save it to disk, and then delegate a "mail foo@bar.com < textfilefromjavamail" to the Linux batch system.

    There is an "at" command which will most likely do exactly what you want.

提交回复
热议问题