mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-01 16:05:39 +00:00
fix: only offer scheduled-send times the server accepts
Stalwart advertises `maxDelayedSend` as a fixed 30 days, but its MTA rejects any hold beyond its `futureRelease` limit, 7 days by default. Now that scheduled send works on Stalwart, a time 8 to 30 days ahead passed the checks and then failed with the raw "501 5.5.4 Requested hold time exceeds maximum of 604800 seconds" reply. Ported from the webmail: - on Stalwart the advertised 30 days count as 7 - a submission or reschedule refused for its hold time throws `ScheduleTooLateError`, and the limit it names replaces the advertised one for that server - the composer and the Scheduled screen show "Too far ahead" for it instead of the SMTP reply The composer's and the Scheduled screen's presets now only list times within the limit, and the undo-send hold, from the composer and from quick reply, is capped at it.
This commit is contained in:
@@ -90,7 +90,7 @@ export function QuickReplyBox({ email, jmapAccountId, onMoreOptions, onSent }: P
|
||||
},
|
||||
identity.id,
|
||||
sent.originalId ?? sent.id,
|
||||
sendDelaySeconds > 0 && jmapClient.hasDelayedSend(jmapAccountId) ? sendDelaySeconds : undefined,
|
||||
jmapClient.undoSendHold(sendDelaySeconds, jmapAccountId),
|
||||
{ draftsMailboxId: drafts ? (drafts.originalId ?? drafts.id) : undefined, accountId: jmapAccountId },
|
||||
);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user