Go, Golang, Backend, Email, Smtp.
//Handle error } err = wc.Close() if err != nil { //Handle error } c.IndentedJSON(http.StatusOK, gin.H{ "response": "success", "message": "email sent", }) Now, we have used the Data method to obtain a writer and initialized it as wc . We have used the Write method of the writer to write the message