How to configure NBug to send email
I have a WPF application that I would like to configure to use NBug to send error reports by email.
The config tool is working correctly and I get a test email, but when I add NBug to the application and run an uncaught exception, I don't get an email. The only configuration I have done follows the Getting Started guide (freely translated to VB.Net).
Private Sub Application_Startup(sender As Object, e As StartupEventArgs) Handles Me.Startup
AddHandler AppDomain.CurrentDomain.UnhandledException, NBug.Handler.UnhandledException
AddHandler Application.Current.DispatcherUnhandledException, NBug.Handler.DispatcherUnhandledException
AddHandler TaskScheduler.UnobservedTaskException, NBug.Handler.UnobservedTaskException
NBug.Settings.UIMode = NBug.Enums.UIMode.Full
NBug.Settings.StoragePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
NBug.Settings.AddDestinationFromConnectionString("Type=Mail;From=bugs@xxx.com;Port=465;SmtpServer=smtp.gmail.com;To=support@xxx.com;UseAttachment=True;UseAuthentication=True;UseSsl=True;Username=bugs@xxx.com;Password=xxx;")
NBug.Settings.ReleaseMode = True
End Sub
The above code removed the username / password from our gmail account which is used for bug reporting.
Any ideas what is wrong with the config or how I could debug?
A zip file attachment is generated, but no email is sent.
+3
source to share
1 answer
Just use NBug.Settings.ReleaseMode = true;
as described in this introductory post: http://www.soygul.com/nbug/
+2
source to share