diff --git a/Logic/Communications/OutboundComm.cs b/Logic/Communications/OutboundComm.cs index e8dfeb89..b87436eb 100644 --- a/Logic/Communications/OutboundComm.cs +++ b/Logic/Communications/OutboundComm.cs @@ -189,7 +189,7 @@ namespace Swarmops.Logic.Communications OutboundComm comm = OutboundComm.Create(null, null, Organization.Sandbox, null /* resolver */, null, CommTransmitterClass.CommsTransmitterMail, - new PayloadEnvelope(new ParticipantMailPayload(sandboxMailAddress + "|" + customSubject, customBody, recipients[0].GetMemberships()[0], recipients[0])).ToXml(), + new PayloadEnvelope(new ParticipantMailPayload(customSubject + "|" + sandboxMailAddress, customBody, recipients[0].GetMemberships()[0], recipients[0])).ToXml(), OutboundCommPriority.Low); foreach (Person person in recipients) diff --git a/Site/Pages/v5/Comms/SendMassMessage.aspx b/Site/Pages/v5/Comms/SendMassMessage.aspx index 3bbe3050..1b705026 100644 --- a/Site/Pages/v5/Comms/SendMassMessage.aspx +++ b/Site/Pages/v5/Comms/SendMassMessage.aspx @@ -75,10 +75,11 @@ ("/Pages/v5/Comms/SendMassMessage.aspx/ExecuteSend", jsonData, function (result) { - $('#spanRecipientCount').text(result); + if (result.Success) { + alertify.alert(SwarmopsJS.unescape('<%= this.Localized_TestMessageResult %>')); + } }); - alertify.alert(SwarmopsJS.unescape('<%= this.Localized_TestMessageResult %>')); return false; } diff --git a/Site/Pages/v5/Comms/SendMassMessage.aspx.cs b/Site/Pages/v5/Comms/SendMassMessage.aspx.cs index 229218df..33097c66 100644 --- a/Site/Pages/v5/Comms/SendMassMessage.aspx.cs +++ b/Site/Pages/v5/Comms/SendMassMessage.aspx.cs @@ -108,7 +108,7 @@ namespace Swarmops.Frontend.Pages.Comms public static AjaxCallResult ExecuteSend(int recipientTypeId, int geographyId, string mode, string subject, string body, string dummyMail, bool live) { - OutboundComm.CreateSandboxMail(subject, body, "test@falkvinge.net"); + OutboundComm.CreateSandboxMail(subject, body, dummyMail); return new AjaxCallResult {Success = false}; } diff --git a/Utility/Communications/CommsTransmitterMail.cs b/Utility/Communications/CommsTransmitterMail.cs index 89d894e0..2568ef36 100644 --- a/Utility/Communications/CommsTransmitterMail.cs +++ b/Utility/Communications/CommsTransmitterMail.cs @@ -59,9 +59,8 @@ namespace Swarmops.Utility.Communications if (person.Identity == 1 && PilotInstallationIds.DevelopmentSandbox == SystemSettings.InstallationId && mail.Subject.Contains("|")) { string[] separated = mail.Subject.Split('|'); - mail.Subject = separated[1]; - BotLog.Write(0, "DEBUG", "'" + separated[0] + "'"); - mail.To.Add(new MailAddress("test@falkvinge.net", "Swarmops Sandbox Administrator")); + mail.Subject = separated[0]; + mail.To.Add(new MailAddress(separated[1], "Swarmops Sandbox Administrator")); } else // regular case to be used... like everywhere else except for the sandbox test {