Skip to content

Commit de49f52

Browse files
committed
tools/submit: support submitting from all message states
submit.php would bail out if not used for the second stage of Delayed Delivery. That is an arbitrary limitation, and for testing, we want to accept any stage.
1 parent e402cc9 commit de49f52

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tools/submit.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,20 @@
3434
if (empty($props[PR_MESSAGE_FLAGS])) {
3535
die("cannot get PR_MESSAGE_FLAGS from message object");
3636
}
37-
if (!($props[PR_MESSAGE_FLAGS] & MSGFLAG_SUBMIT))
38-
die("message " . $argv[2] . " was not submitted");
37+
if (!($props[PR_MESSAGE_FLAGS] & MSGFLAG_SUBMIT)) {
38+
fwrite(STDERR, "$argv[2]: submit-init\n");
39+
#
40+
# MSGFLAG_SUBMIT not set. submitmessage() will start delayed
41+
# delivery timers (if desired), or send right away and purge.
42+
#
43+
} else {
44+
fwrite(STDERR, "$argv[2]: submit-now\n");
45+
#
46+
# MSGFLAG_SUBMIT is set. This means, now that we are called
47+
# (possibly a second time) that the timer has expired.
48+
# Send immediately.
49+
#
50+
}
3951
mapi_message_submitmessage($message);
4052
exit("message " . $argv[2] . " has been submitted successfully");
4153
?>

0 commit comments

Comments
 (0)