To set up Undo Email option in Gmail
1. Select the gear icon from top right corner of your Gmail a dropdown menu will appear and select Settings.
2. The settings page will open select labs tab
3. Scroll to the bottom you will see undo Send select enable.
4. Click Save Changes in the bottom of settings page.
5. All done come back to your inbox and compose a mail to check.
When you hit send an email the dialogue that displays “your Message has been sent” will also show you the undo option .if you click on undo the email will reopen in the composition window.
In Default you have 10 seconds to hit the undo button otherwise the button will disappear. You can adjust that time by going to Settings >General>Undo Send and select the amount of seconds that you want the Undo Email message to be displayed.