Just a patch submission for DiagnosticsPageBase.cs CheckEmailAccount() method.
The current implementation tries to send a message to and from support@znode.com. This not useful and if an admin made it work could open up the mail server to relaying attacks heres a code fragment that uses the configuration settings to set up who to send to and from as well as make the dialog a bit more expressive of what happened.
StoreSettingsAdmin storeAdmin = new StoreSettingsAdmin();Portal portal = storeAdmin.GetByPortalId(ZNodeConfigManager.SiteConfig.PortalID);
ZNodeEmail.SendEmail(portal.AdminEmail, portal.AdminEmail, string.Empty, "Diagnostic Test", "SMTP Account Test", false);
lblSMTPAccountStatus.Text = " SMTP Settings ok - Test message sent to " + portal.AdminEmail;lblSMTPAccountStatus.CssClass = "Success";
Just a patch submission for
Just a patch submission for DiagnosticsPageBase.cs CheckEmailAccount() method.
The current implementation tries to send a message to and from support@znode.com. This not useful and if an admin made it work could open up the mail server to relaying attacks heres a code fragment that uses the configuration settings to set up who to send to and from as well as make the dialog a bit more expressive of what happened.
StoreSettingsAdmin storeAdmin = new StoreSettingsAdmin();Portal portal = storeAdmin.GetByPortalId(ZNodeConfigManager.SiteConfig.PortalID);
ZNodeEmail.SendEmail(portal.AdminEmail, portal.AdminEmail, string.Empty, "Diagnostic Test", "SMTP Account Test", false);
lblSMTPAccountStatus.Text = " SMTP Settings ok - Test message sent to " + portal.AdminEmail;lblSMTPAccountStatus.CssClass = "Success";