@ all
None of the above solutions worked in my case, so I decided to make my own mail script. Most of it is custom, but the basics look like this. It might be helpful for other people:
[Code moderated as per the Forum Rules. Please use the pastebin]
Good luck!