Created
March 31, 2019 11:07
-
-
Save sintongPanjaitan/32567d0ecb10e3e32459adc6d155b7d2 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
package id.medium.spring.mail.controller; | |
import id.medium.spring.mail.Mail.MailRequest; | |
import id.medium.spring.mail.Mail.MailResponse; | |
import id.medium.spring.mail.service.EmailService; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.web.bind.annotation.PostMapping; | |
import org.springframework.web.bind.annotation.RequestBody; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
public class SendingEmail { | |
@Autowired | |
private EmailService service; | |
@PostMapping("/sendingEmail") | |
public MailResponse sendEmail(@RequestBody MailRequest request) { | |
return service.sendEmail(request); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment