mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 08:16:05 -07:00
Added the ability to sepcify a username in the email notification settings for external MTA's. We have had to add a new option called Email Sender because of this. #78
This commit is contained in:
parent
0b48627ba1
commit
2d016315c7
4 changed files with 13 additions and 3 deletions
|
@ -6,6 +6,7 @@
|
||||||
public int EmailPort { get; set; }
|
public int EmailPort { get; set; }
|
||||||
public bool Ssl { get; set; }
|
public bool Ssl { get; set; }
|
||||||
public string RecipientEmail { get; set; }
|
public string RecipientEmail { get; set; }
|
||||||
|
public string EmailSender { get; set; }
|
||||||
public string EmailUsername { get; set; }
|
public string EmailUsername { get; set; }
|
||||||
public string EmailPassword { get; set; }
|
public string EmailPassword { get; set; }
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace PlexRequests.Services.Notification
|
||||||
IsBodyHtml = true,
|
IsBodyHtml = true,
|
||||||
To = { new MailAddress(Settings.RecipientEmail) },
|
To = { new MailAddress(Settings.RecipientEmail) },
|
||||||
Body = $"Hello! The user '{model.User}' has requested {model.Title}! Please log in to approve this request. Request Date: {model.DateTime.ToString("f")}",
|
Body = $"Hello! The user '{model.User}' has requested {model.Title}! Please log in to approve this request. Request Date: {model.DateTime.ToString("f")}",
|
||||||
From = new MailAddress(Settings.EmailUsername),
|
From = new MailAddress(Settings.EmailSender),
|
||||||
Subject = $"Plex Requests: New request for {model.Title}!"
|
Subject = $"Plex Requests: New request for {model.Title}!"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ namespace PlexRequests.Services.Notification
|
||||||
IsBodyHtml = true,
|
IsBodyHtml = true,
|
||||||
To = { new MailAddress(Settings.RecipientEmail) },
|
To = { new MailAddress(Settings.RecipientEmail) },
|
||||||
Body = $"Hello! The user '{model.User}' has reported a new issue {model.Body} for the title {model.Title}!",
|
Body = $"Hello! The user '{model.User}' has reported a new issue {model.Body} for the title {model.Title}!",
|
||||||
From = new MailAddress(Settings.EmailUsername),
|
From = new MailAddress(Settings.RecipientEmail),
|
||||||
Subject = $"Plex Requests: New issue for {model.Title}!"
|
Subject = $"Plex Requests: New issue for {model.Title}!"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,10 @@ namespace PlexRequests.UI.Validators
|
||||||
RuleFor(request => request.EmailPort).NotEmpty().WithMessage("You must specify a Port.");
|
RuleFor(request => request.EmailPort).NotEmpty().WithMessage("You must specify a Port.");
|
||||||
RuleFor(request => request.RecipientEmail).NotEmpty().WithMessage("You must specify a Recipient.");
|
RuleFor(request => request.RecipientEmail).NotEmpty().WithMessage("You must specify a Recipient.");
|
||||||
RuleFor(request => request.RecipientEmail).EmailAddress().WithMessage("You must specify a valid Recipient.");
|
RuleFor(request => request.RecipientEmail).EmailAddress().WithMessage("You must specify a valid Recipient.");
|
||||||
RuleFor(request => request.EmailUsername).EmailAddress().WithMessage("You must specify a valid Username.");
|
|
||||||
RuleFor(request => request.EmailUsername).NotEmpty().WithMessage("You must specify a Username.");
|
RuleFor(request => request.EmailUsername).NotEmpty().WithMessage("You must specify a Username.");
|
||||||
RuleFor(request => request.EmailPassword).NotEmpty().WithMessage("You must specify a valid password.");
|
RuleFor(request => request.EmailPassword).NotEmpty().WithMessage("You must specify a valid password.");
|
||||||
|
RuleFor(request => request.EmailSender).EmailAddress().WithMessage("You must specify a valid Email for the email sender.");
|
||||||
|
RuleFor(request => request.EmailSender).NotEmpty().WithMessage("You must specify a Email Sender.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -59,6 +59,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="EmailSender" class="control-label">Email Sender</label>
|
||||||
|
<div>
|
||||||
|
<input type="text" class="form-control form-control-custom " id="EmailSender" name="EmailSender" value="@Model.EmailSender">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="RecipientEmail" class="control-label">Email Recipient</label>
|
<label for="RecipientEmail" class="control-label">Email Recipient</label>
|
||||||
<div>
|
<div>
|
||||||
|
@ -66,6 +72,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="EmailUsername" class="control-label">Username</label>
|
<label for="EmailUsername" class="control-label">Username</label>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue