Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "MailTo": "abcdefg@hijklmn.opqrst",
- "Subject": "This is the subject",
- "Body": "This is the body"
- }
- [HttpPost]
- public IHttpActionResult SendMail([FromBody] MailData mailData)
- {
- if(ValidateMailData(mailData) == true)
- {
- Email.send(mailData);
- return Ok("Your email was sent!");
- }
- return BadRequest("Some error");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement