This is a standard format of a quick resignation letter :
Dear Sir/Ma’am, I would like to inform you that I, (name), working as a (position) in your company, would like to submit my formal resignation, effective (date). I am resigning with such short notice due to (reason). I apologize for the inconvenience of the matter, but I hope you can understand my urgency.