Made a project on ASP.Net Core 2.0.0, which sends form data to my inbox. I use MailKit 2.0.2 and smtp Yandex. Everything worked, but after I deployed the project on the linux ubuntu 16.04 server, the email stopped being sent, and instead we get error 504. What could be the problem and how to fix it? Log Log:

Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0] Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: An unhandled exception has occurred: The path in 'value' must sta rt with '/'. Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: Parameter name: value Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: System.ArgumentException: The path in 'value' must start with '/'. Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: Parameter name: value Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: at Microsoft.AspNetCore.Http.PathString..ctor(String value) Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: at Microsoft.AspNetCore.Builder.StatusCodePagesExtensions.<>c__Displ ayClass6_0.<<UseStatusCodePagesWithReExecute>b__0>d.MoveNext() Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: --- End of stack trace from previous location where exception was throw n - -- Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDe buggerNotification(Task task) Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.<Invok e>d__3.MoveNext() Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: --- End of stack trace from previous location where exception was throw n - -- Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDe buggerNotification(Task task) Oct 04 00:26:55 zra-services-droplet dotnet-example[29586]: at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invo ke>d__6.MoveNext() 
  • one
    Where is the code? Without a "patient" diagnosis is not set! - EvgeniyZ

0