Gmail has an option of recalling emails. This can help undo emails sent by mistake or not to be sent in the first place.
This undo option can be enabled as follows :
Login to Gmail and access Settings by clicking on the gear icon.
Next, scroll down and enable the tick next to Enable Undo Send. Also, the default send cancellation period can be changed from 10 seconds to a maximum of 30 seconds if needed.
Scroll to bottom and hit Save Changes.
From now on, whenever an email is sent, an Undo option will be visible after the message is sent.
Clicking on it will undo the sending .
The message will be back in composing mode, ready to be edited if needed.
All done.