Open ThomasTJdev opened 5 months ago
You very likely already know this, but you usually need to have elevated permissions to bind to low numbered ports. Have you tried the same process with root permissions?
Thanks for the suggestion @tmiad2 . Running as root makes no difference. Examples below failes with Nim 2.0.2, but runs fine with Nim 1.6.18.
-d:release
$ sudo ./email_test
[sudo] password for user:
oserrors.nim(92) raiseOSError
Error: unhandled exception: Additional info: No valid socket error code available [OSError]
-d:dev
$ sudo ./email_test
/home/user/tmp/email_test.nim(6) email_test
/home/user/.nimble/pkgs2/smtp-0.1.0-6c799a1929f178017e7f1b47a8f73f8882acda66/smtp.nim(267) connect
/home/user/.nimble/pkgs2/smtp-0.1.0-6c799a1929f178017e7f1b47a8f73f8882acda66/smtp.nim(227) checkReply
/home/user/.nimble/pkgs2/smtp-0.1.0-6c799a1929f178017e7f1b47a8f73f8882acda66/smtp.nim(109) debugRecv
/home/user/.choosenim/toolchains/nim-2.0.2/lib/pure/net.nim(1654) recvLine
/home/user/.choosenim/toolchains/nim-2.0.2/lib/pure/net.nim(1602) readLine
/home/user/.choosenim/toolchains/nim-2.0.2/lib/pure/net.nim(941) getSocketError
/home/user/.choosenim/toolchains/nim-2.0.2/lib/std/oserrors.nim(92) raiseOSError
Error: unhandled exception: Additional info: No valid socket error code available [OSError]
I can confirm that PR https://github.com/nim-lang/smtp/pull/11 solves this issue
Description
Very basic code example sending emails works fine - besides when being deployed on Ubuntu 20.04.
Info
Code snippet Identical to the mail code example.
Nim Version
Current Output
Expected Output
No response
Possible Solution
No response
Additional Information
No response