mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Added enabled config around 'delete' for email.
This commit is contained in:
parent
17a66c79c2
commit
b6809d4390
@ -339,13 +339,16 @@ namespace Teknik.Areas.Profile.Controllers
|
|||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
// Delete Email
|
if (Config.EmailConfig.Enabled)
|
||||||
var app = new hMailServer.Application();
|
{
|
||||||
app.Connect();
|
// Delete Email
|
||||||
app.Authenticate(Config.EmailConfig.Username, Config.EmailConfig.Password);
|
var app = new hMailServer.Application();
|
||||||
var domain = app.Domains.ItemByName[Config.EmailConfig.Domain];
|
app.Connect();
|
||||||
var account = domain.Accounts.ItemByAddress[string.Format("{0}@{1}", User.Identity.Name, Config.EmailConfig.Domain)];
|
app.Authenticate(Config.EmailConfig.Username, Config.EmailConfig.Password);
|
||||||
account.Delete();
|
var domain = app.Domains.ItemByName[Config.EmailConfig.Domain];
|
||||||
|
var account = domain.Accounts.ItemByAddress[string.Format("{0}@{1}", User.Identity.Name, Config.EmailConfig.Domain)];
|
||||||
|
account.Delete();
|
||||||
|
}
|
||||||
|
|
||||||
// Delete Git
|
// Delete Git
|
||||||
if (Config.GitConfig.Enabled)
|
if (Config.GitConfig.Enabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user