Application sends Email when on local pc but stops working when deployed on Azure

Ivan7777 0 Reputation points
2024-06-27T10:36:06.89+00:00

I created a simple web page with a form on it that sends an email to the owner. When I enter the data and click Send button, you can see on one of the pictures that in the console there is an Error. When I investigated further within Azure Portal in Failures it shows that every time I try to send an email the program throws an ArgumentNullException(see another screenshot). The thing is when I try this on my local pc the method

using

) works fine and I don't know how to debug when it's on the server. Obviously something does't work right. It says that parameter address in MailboxAddress.ctor is null. (MimeKit.MailboxAddress_throws_Exception

) (ConsoleErrorScreenShot

)

I tried to send a message but the message doesn't go through.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,328 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,550 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 27,341 Reputation points
    2024-06-27T12:49:34.4666667+00:00

    According to the error an address is null. You'll want to use the browser's dev tools to verify the payload is expected.

    The 404 errors means the files was not found. You'll want to verify the files exist and the path in the wwwroot folder is correct.

    The err_blocked_by_client can due to browser ad blockers or extensions in the browser.

    0 comments No comments