A simple REST API service to verify email addresses. Using SMTP Callback Verification.
Make a request.
curl -i "http://localhost/verify/[email protected]"
Which generates the following response.
{
"email": "[email protected]",
"isValid": true
}
- Build project with Go.
go build
- Spin up server locally.
PORT=8080 ./smtp-callback-verification
Note that server port is read from the environment. - Send a request.
curl -i "http://localhost:8080/verify/[email protected]"
- 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 protected]"