is Fun" val to = Email("[email protected]") val content = Content("text/plain", "and easy to do anywhere, even with Kotlin") val mail = Mail(from, subject, to, content) val sg = SendGrid("*****") val request = Request() try { request.method = Method.POST request.endpoint = "mail/send" request.body = mail.build() val response = sg.api(request) //略 } catch (ex: IOException) { throw ex }