Created
December 31, 2019 14:34
-
-
Save Wanchai/2f5242d0527f54a7da7af6b9d8b58fe8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MailerApi.Services; | |
using Microsoft.AspNetCore.Mvc; | |
namespace MailerApi.Controllers | |
{ | |
[ApiController] | |
[Route("[controller]")] | |
public class TestController : ControllerBase | |
{ | |
EmailerService Mailer { get; } | |
public TestController(EmailerService mailer) | |
{ | |
Mailer = mailer; | |
} | |
[HttpGet] | |
public IActionResult Get() | |
{ | |
Mailer.Send("Mister Test", "test@mail.com", "Hi, it's me.", "My plain text content", "<p>My HTML content</p>"); | |
return Ok("ok"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment