Code snippet contribution

Sep 17, 2012 at 7:31 PM
Edited Sep 17, 2012 at 8:31 PM

Shalom,

During simulation I had an error sending mail message. The messageBox display does not show usable details need to fix the problem.

Here is additional detail that can assist in fixing the problem:

     void SmtpClientSendCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
            {
                if (e.Error != null)
                {
                    MessageBox.Show(string.Format("Sending message error:\n{0}\n{1}", e.Error.Message, e.Error.ToString()), e.Error.Message,
                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                    
                }
                else
                {
                    MessageBox.Show(string.Format("Crassh report of {0} {1} is sent to the developer. Thanks for your support.", _appTitle, _appVersion), Resources.CrashReport_Crash_report_sent, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }