Сделал проект на ASP.Net Core 2.0.0, который отправляет ко мне на почтовый ящик данные из формы. Использую MailKit 2.0.2 и smtp яндекса. Все работало, но после того, как я развернул проект на сервере linux ubuntu 16.04, письмо перестало отправляться, а вместо этого получаем ошибку 504. В чем могут быть проблемы и как это исправить ?
Лог журнала:
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()