Append the recipient to a list of those whereby mail delivery failed

This commit is contained in:
Tristan B. Kildaire 2020-07-18 19:58:39 +02:00
parent 27ed30a815
commit b299bd2515
1 changed files with 8 additions and 0 deletions

View File

@ -552,6 +552,10 @@ public final class ButterflyClient : Thread
recipients ~= recipient.str();
}
/* List of server's failed to deliver to */
string[] failedRecipients;
/* Send the mail to each of the recipients */
foreach(string recipient; recipients)
{
@ -656,6 +660,10 @@ public final class ButterflyClient : Thread
{
deliveryFailed:
writeln("Error delivering to server "~domain);
/* TODO: Make a list of all the servers we failed to deliver to */
failedRecipients~=domain;
continue;
}
}