zabszk / CSharp-SMTP-Server

SMTP Server in C#
MIT License
16 stars 4 forks source link

Linux support? #6

Closed ESEricWare closed 1 year ago

ESEricWare commented 1 year ago

Hi everyone,

I'm trying to use this library in a docker container on Linux.

the library is starting successful but when it comes to receive a mail it's throwing this exception:

[Client receive loop] Exception: System.IndexOutOfRangeException, Index was outside the bounds of the array.

Any Idea?

Thanks in advance

ESEricWare commented 1 year ago

Found a solution:

EMailParser.cs in line 37

I changed

if (!char.IsWhiteSpace(split[j][0]) || string.IsNullOrWhiteSpace(split[j]))

against

if (string.IsNullOrWhiteSpace(split[j]) || !char.IsWhiteSpace(split[j][0]))

zabszk commented 1 year ago

Hi,

Thanks for reporting the issue. I will apply your fix in a second.

zabszk commented 1 year ago

Issue fixed in version 1.1.5.