elmah / Elmah

Error Logging Modules & Handlers for ASP.NET
https://elmah.github.io/
Apache License 2.0
306 stars 65 forks source link

Email Notify not working on .NET Core Standard 7 #441

Closed briankitt closed 1 year ago

briankitt commented 1 year ago

This is a fresh install of Elmah on .NET Core Standard 7

I set up as follows. I do get a SQL report, however, I do not get an email notify. I do not see any errors in the event log. Running a packet sniffer, I see no attempt to contact Gmail.

            services.AddElmah<SqlErrorLog>(options => {
                options.Path = "~/ErrorTrap";
                options.ConnectionString = _connectionStrings.SqlServer;
                options.SqlServerDatabaseSchemaName = "Errors";
                options.SqlServerDatabaseTableName = "Error";
                options.Notifiers.Add(new ErrorMailNotifier("Custom", new EmailOptions()
                {
                    SendYsod = true,
                    AuthPassword = "<Redacted>",
                    AuthUserName = <Redacted>",
                    MailRecipient = "<Redacted>",
                    MailSender = "<Redacted>",
                    MailSubjectFormat = "Error ({1}): {0}",
                    ReportAsynchronously = false,
                    SmtpPort = 587,
                    SmtpServer = "smtp.gmail.com",
                }));
                options.ApplicationName = _programSettings.Customer + " API " + _programSettings.Site;
           });
atifaziz commented 1 year ago

I think you meant to report this to ElmahCore/ElmahCore?

briankitt commented 1 year ago

Oh, I apologize, I did pick the wrong repository.