We had an issue with our SMTP server and now many messages are in the SMTPOut table waiting for delivery. However, because iService tried to send them many times the next retry date is too far out.
How can I set the date so that iService tries to deliver them right away?
In the SMTP Out table the column "timeSent" is used to determine when to retry sending messages. When a message is first created, this value is NULL. That tells the iService Mail Processor the message has never been tried and to send immediately. You can reset this value to NULL and then the messages will be retried right away.
Once a messages is successfully handed off to an SMTP server, the value for isSent is set to 1. Therefore, you can find all messages that have NOT been sent by looking for isSent - 0.
The query below will find all unsent messages and set them for immediate delivery. Make sure you run this against the proper iService Tenant database.
UPDATE SmtpOut SET timeSent = NULL WHERE isSent = 0