so what are the different sections called in the main part? Branches?
If you mean the additional space for example
Code:
goto testmail
<--- this blank line
dry:
They are only there to show logical breaks in the code. Just be careful though, there's only one case (and this is the one) where it's not actually "linear code". All the others are actually part of conditional execution - where an instruction is either skipped (test result) or conditionally branched around.
This is where I find flowcharting to be particularly helpful. I didn't bother with yours as it is sufficiently simple its easy to remember what its doing, but I have others like this one http://support.rossw.net/tomw/webctl-tracker-flowchart.pdf that would be unmaintainable without a flowchart