I saw that the LSIO deluge image was using ubuntu 18.04.1, so I downloaded the iso and fired it up in a VM to test the code-sections I posted earlier plus deluge and the moded plugin, in the livecd - unfortuently could not reproduce there neither, as works fine for me with deluge and the moded notifications or notifications2, and the code bits all works, so gets email in inbox afterwards(should be run with 'python3' but anyway worked too with just 'python', but 'python3' is best to test). The last two code-exmples failed, because the openssl version included in that ubuntu was v1.1.0g, or 1.1.1 if upgraded, and didn't have such object 'tlsversion' like I had in more recent openssl, or if part of python's ssl wrapper module I dunno, which was 3.6.5 in that ubuntu and upgraded 3.6.9, but anyway, so I had to delete that line and then worked and got mail each time.
Anyway, it's pretty hard to work in blind and try come up with solutions, and annoying for you to test alot of failed attempts, so please test anyway what I posted before, but i'm going to see if I can figure out how to try that docker image myself in a vm if possible without it taking to much time, and then testing from there, since else I cannot reproduce, in now arch, 3 different ubuntu versions and win10.
I'll return if finding some usefull later on, if not takes to much time - I have some free time on my hands currently, and don't mind a challenge, but neither don't wanna spend way too much time on it, but lets see how goes
- I got docker setup in a linux VM and installed the LSIO deluge image there and for now just tested the commands I posted previously, in opened terminal of running container, and which works fine for me and sends mail out correctly, except as said before that the tlsversion attribute isn't supported in one of these installed components and so needs deleting that line in last two versions. I'll test with the modified plugin tomorrow and report back but i'm pretty sure it will work because the code example that you tested last, I just rechecked that it's pretty much the same calls the plugin uses for calling smtplib, so shouldn't change anything, and so will make me not be able to go any further then, sorry.
- Just checked deluge in the linux VMs deluge LSIO docker image with notifications2 smtp.gmail.com, 587, ssl/tls, and worked fine and got mail in inbox. Sadly this is out of my reach unfortunetly then.
- I always thought docker images where full distro's each(so practically just a type of VMs wrapped with a frontend), and so always thought to myself it seemed wildly ineffecient/bloated and especially if running multiple images, but I see after actually reading little up on it that it uses the host systems kernel etc, so I searched your older posts to find if you disclosed your distro and version and saw you're on debian NAS and synology NAS - could you please give me exact versions of each(and if updated after install or "vanilla") and if happens both places? If not to much trouble then maybe I could test through a livecd iso or something if available(no NAS knowledge whatsoever myself), or if I have to, make quick VM install - if solving/workarounding this issue if possible, then obviously would be helpful for other users of said systems as you.