@@ -42,30 +42,30 @@ private static void Throw_CustomMessage_Click(object sender, EventArgs e)
4242 {
4343 var file1 = Path . GetTempFileName ( ) + "-file1.txt" ;
4444 var file2 = Path . GetTempFileName ( ) + "-file2.txt" ;
45- var file3 = Path . GetTempFileName ( ) + "-file3.zip" ;
45+ // var file3 = Path.GetTempFileName() + "-file3.zip";
4646
4747 File . WriteAllText ( file1 , "test text file 1" ) ;
4848 File . WriteAllText ( file2 , "test text file 2" ) ;
49- File . WriteAllText ( file3 , "test text file 3" ) ;
49+ // File.WriteAllText(file3, "test text file 3");
5050
5151 var exceptionReporter = new ExceptionReporter ( ) ;
5252 var config = exceptionReporter . Config ;
5353
5454 config . ShowAssembliesTab = false ;
55- config . FilesToAttach = new [ ] { file1 , file2 , file3 } ;
55+ config . FilesToAttach = new [ ] { file1 , file2 } ; // , file3 };
5656 config . TakeScreenshot = true ;
5757
5858 //--- Test SMTP
59- // config.MailMethod = ExceptionReportInfo.EmailMethod.SMTP;
60- // config.SmtpPort = 587 ;
61- // config.SmtpServer= "smtp.gmail.com" ;
62- // config.SmtpUsername = "<user>";
63- // config.SmtpUseSsl = true; // NB you'll need to have "Allow less secure apps: ON" if using gmail for this
64- // config.SmtpPassword = "<password> ";
65- // config.SmtpFromAddress = "[email protected] "; 66- // config.EmailReportAddress = "<user>";
67- //----
68-
59+ config . MailMethod = ExceptionReportInfo . EmailMethod . SMTP ;
60+ config . SmtpServer = "smtp.gmail.com" ;
61+ config . SmtpPort = 587 ;
62+ config . SmtpUsername = "<user>" ;
63+ config . SmtpPassword = "<password>" ;
64+ config . SmtpFromAddress = "[email protected] " ; 65+ config . EmailReportAddress = "<emailto> " ;
66+ config . SmtpUseSsl = true ; // NB you'll need to have "Allow less secure apps: ON" if using gmail for this
67+ //----
68+
6969 exceptionReporter . Show ( "temp files will be attached to the email sent" , exception ) ;
7070 }
7171 }
0 commit comments