It was super helpful, I spend a day trying to separate it myself and create an object-oriented script. I used these scripts here now as base for what I initially planned. I am relieved, that it works now. If you are interested in my code, since I also cleaned it up (some snippets were left from either send or receive), let me know. Thank you so much, I would not have been able to do this without your work and tutorials.
Glad you got it working if you send them yo me I will make them available as a download if that is ok. Use the ask steve page to contact me then we can exchange the script via email.