void mailMessage_MailSent(object sender, Venetasoft.WP7.ValueEventArgs <bool> e) { try { if (e.Value == false) //mail not sent { string errMsg = mailMessage.LastError; if (errMsg.Contains("Connection lost") == false && errMsg.Contains("Aborted by user") == false) { errMsg += "\r\nLast server response: " + mailMessage.LastServerResponse; } MessageBox.Show("Error sending mail: " + errMsg); listBoxAttachments.Items.Clear(); } else { MessageBox.Show("Email successfully sent."); } ResetUI(); textBoxMailTo.Text = ""; } catch { } }
void mailMessage_Progress(object sender, Venetasoft.WP7.ValueEventArgs <int> e) { try { this.rectangleProgress.Width = (int)((421 * e.Value) / 100); if (e.Value == 0) { textBlockProgress.Text = "Connecting..."; } else { textBlockProgress.Text = "Sending " + e.Value.ToString() + "%"; } } catch (Exception) { } }
void emailMessage_MailSent(object sender, Venetasoft.WP7.ValueEventArgs <bool> e) { App.vcards = null; App.vCard = null; }