Back

Email Message Scheduling issue

  • 0
  • Messaging
  • Web
  • Cloud
Hemant
5 Feb, 2025, 17:27

I am trying to schedule a mail using the createEmail() API from the node-appwrite module, in the docs it is mentioned that the scheduleAt parameter is optional but when I leave the string empty it generates an error like this:

code: 400, type: 'general_argument_invalid', response: { message: 'Invalid scheduledAt param: Value must be valid date in the future and between 0000-01-01 00:00:00 and 9999-12-31 00:00:00.', code: 400, type: 'general_argument_invalid', version: '1.6.1' }

then if I pass the scheduleAt paramter with the date and time as current date and time expecting it to immediately send the mail, it actualls schedules it to some different time in future, I don't get this weird behaviour...

TL;DR
Issue: Attempting to schedule an email message using the `createEmail()` API from the node-appwrite module results in an error when leaving the `scheduleAt` parameter empty. Additionally, providing the current date and time does not result in the email being sent immediately. Solution: The `scheduleAt` parameter must be a valid date in the future between '0000-01-01 00:00:00' and '9999-12-31 00:00:00'. Ensure to provide a future date and time for scheduling the email successfully.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more