S
S
Saharman2018-10-04 03:18:52
ASP.NET
Saharman, 2018-10-04 03:18:52

Why is ASP.Net Core 2.0.0 mail not being sent?

I made a project on ASP.Net Core 2.0.0, which sends data from the form to my mailbox. I use MailKit 2.0.2 and Yandex smtp. Everything worked, but after I deployed the project on the linux ubuntu 16.04 server, the email stopped sending, and instead we get a 504 error. What could be the problems 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()

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question