~deavmi/butterflyd

c711ad7b19fc41c8e3598c2fc755926c5fdd8daa — Tristan B. Kildaire 6 months ago 1fcbd5b v0.0.28
Add message JSON to the delivery report.
1 files changed, 3 insertions(+), 2 deletions(-)

M source/client/client.d
M source/client/client.d => source/client/client.d +3 -2
@@ 582,7 582,6 @@ public final class ButterflyClient : Thread
                if(!Mailbox.isMailbox(username))
                {
                    goto deliveryFailed;
                
                }

                /* Get the Mailbox of a given user */


@@ 688,7 687,9 @@ public final class ButterflyClient : Thread
                deliveryReport["recipients"] = mailbox.username~"@"~server.domain;

                /* TODO: Make more indepth, and have copy of the mail that was tried to be sent */
                deliveryReport["message"] = "There was an error delivery the mail to: "~to!(string)(recipients);
                string errorMessage = "There was an error delivery the mail to: "~to!(string)(recipients)~"\n";
                errorMessage ~= "\nThe message was:\n\n"~mailBlock.toPrettyString();
                deliveryReport["message"] = errorMessage;
                
                /* Deliver the error message */
                deliverMail(deliveryReport);