We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm configuring exceptional email options in my asp.net core 3.1 app. But doesn't seem to work.
here is my start up,
services.AddExceptional(settings => { settings.Store.ApplicationName = "Exceptional.Web"; settings.Store.Type = "SQL"; settings.Store.ConnectionString = "Server=(localdb)\\mssqllocaldb;Database=ExceptionalDemos;Trusted_Connection=True;MultipleActiveResultSets=true"; settings.UseExceptionalPageOnThrow = false; settings.Email.ToAddress = "[email protected]"; settings.Email.FromAddress = "[email protected]"; settings.Email.FromDisplayName = "[email protected]"; settings.Email.SMTPHost = "xxxx.xxxx.net"; settings.Email.SMTPPort = 0000; settings.Email.SMTPUserName = "[email protected]"; settings.Email.SMTPPassword = "xxxx"; settings.Email.SMTPEnableSSL = true; });
I'm using the same to send email in my app and it works,
using (var smtp = new SmtpClient("xxxx.xxxx.net", 0000)) { smtp.UseDefaultCredentials = false; smtp.EnableSsl = true; NetworkCredential credentials = new NetworkCredential("[email protected]", "xxxx"); smtp.Credentials = credentials; var msg = new MailMessage { Body = "Error From App", Subject = "Error Test", From = new MailAddress("[email protected]") }; msg.To.Add("[email protected]"); await smtp.SendMailAsync(msg); }
I not able to find out any error messages logged in console. Any ideas on why the exception emails are not getting sent?
The text was updated successfully, but these errors were encountered:
Ah, we create this in the bind case (loading config from a file, etc.) but not in code. You could currently manually add it via:
settings.Register(new EmailNotifier(settings.Email));
...but yes, should re-visit how this behaves for code configuration.
Overall, your code can look something like this:
services.AddExceptional(settings => { settings.Store.ApplicationName = "Exceptional.Web"; settings.Store.Type = "SQL"; settings.Store.ConnectionString = "Server=(localdb)\\mssqllocaldb;Database=ExceptionalDemos;Trusted_Connection=True;MultipleActiveResultSets=true"; settings.UseExceptionalPageOnThrow = false; settings.Register(new EmailNotifier(new EmailSettings() { ToAddress = "[email protected]", FromAddress = "[email protected]", FromDisplayName = "[email protected]", SMTPHost = "xxxx.xxxx.net", SMTPPort = 0000, SMTPUserName = "[email protected]", SMTPPassword = "xxxx", SMTPEnableSSL = true })); });
Sorry, something went wrong.
No branches or pull requests
I'm configuring exceptional email options in my asp.net core 3.1 app. But doesn't seem to work.
here is my start up,
I'm using the same to send email in my app and it works,
I not able to find out any error messages logged in console. Any ideas on why the exception emails are not getting sent?
The text was updated successfully, but these errors were encountered: