This commit is contained in:
@@ -233,7 +233,7 @@ namespace AyaNova.Api.Controllers
|
||||
/// Send direct SMTP message notification so single object / address
|
||||
/// Note: adds to queue, not instantly sent
|
||||
/// </summary>
|
||||
/// <returns>NoContent on success or error</returns>
|
||||
/// <returns>Accepted on success or error</returns>
|
||||
[HttpPost("direct-smtp")]
|
||||
public async Task<IActionResult> SendNotifySmtpDirectMessage([FromBody] NotifyDirectSMTP notifyDirectSMTP)
|
||||
{
|
||||
@@ -287,7 +287,7 @@ namespace AyaNova.Api.Controllers
|
||||
IMailer m = AyaNova.Util.ServiceProviderProvider.Mailer;
|
||||
try
|
||||
{
|
||||
await m.SendEmailAsync(notifyDirectSMTP.ToAddress, "Test from Notification system", "This is a test to confirm notification system is working", ServerGlobalOpsSettingsCache.Notify);
|
||||
await m.SendEmailAsync(notifyDirectSMTP.ToAddress, notifyDirectSMTP.Subject, notifyDirectSMTP.TextBody, ServerGlobalOpsSettingsCache.Notify,null,null,notifyDirectSMTP.HTMLBody);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -295,7 +295,7 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(500, new ApiErrorResponse(ApiErrorCode.API_SERVER_ERROR, null, ExceptionUtil.ExtractAllExceptionMessages(ex)));
|
||||
}
|
||||
|
||||
return NoContent();
|
||||
return Accepted();
|
||||
}
|
||||
|
||||
public class NotifyDirectSMTP
|
||||
|
||||
Reference in New Issue
Block a user