My Program runs on an debian 10 Linux Server.
I used a package in my C# programm called EASendMail but it doesn't work with the normal System.Net.Mail aswell.
This is my code snippet I use for sending a mail
SmtpMail oMail = new SmtpMail("mykey");
oMail.From = fromEmail;
oMail.To = toEmail;
oMail.Subject = "Subject";
oMail.TextBody = "Body";
SmtpServer oServer = new SmtpServer(exchange);
oServer.User = email;
oServer.Password = pass;
oServer.Port = 25;
Console.WriteLine("start to send email ...");
SmtpClient oSmtp = new SmtpClient();
oSmtp.SendMail(oServer, oMail);
Console.WriteLine("email was sent successfully!");
Everytime I start my program on linux with dotnet run
the whole porgram runs perfectly. If it comes do the smtp part this error appears: Unable to load shared library 'kernel32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libkernel32.dll: cannot open shared object file: No such file or directory
I understand that kernel32.dll is only for windows but is there any fix to this?
Thanks in advance!!