A simple REST API service to verify email addresses. Using SMTP Callback Verification.
Make a request.
curl -i "http://localhost/verify/?email=paul@gmail.com"Which generates the following response.
{
"email": "paul@gmail.com",
"isValid": true
}- Build project with Go.
go build - Spin up server locally.
PORT=8080 ./smtp-callback-verificationNote that server port is read from the environment. - Send a request.
curl -i "http://localhost:8080/verify/?email=paul@gmail.com"
- Create a Heroku app with Go buildpack.
heroku create -b https://github.com/kr/heroku-buildpack-go.git - Deploy this app to Heroku.
git push heroku master - Send a request.
curl -i "http://<YOUR_APP>.herokuap.com/verify/?email=paul@gmail.com"