void btn_SendInfo_Click(object sender, EventArgs e) { try { Mapi mapi = new Mapi(); mapi.SendMail(ReportBuilder.ReportFileName); } catch (Win32Exception w32e) { Logger.Error(w32e.ToString()); MessageBox.Show("There is no e-mail client. Please send the file manually."); } catch (InvalidOperationException iox) { Logger.Error(iox.ToString()); MessageBox.Show(String.Format( "Error during opening default client!\nPlease send the file\n {0} {1} \nmanually." , Path.Combine(Directory.GetCurrentDirectory(), ReportBuilder.ReportFileName))); } catch (Exception ex) { Logger.Error(ex.ToString()); MessageBox.Show(ex.ToString()); } }