/// <summary> /// This method is called when asynchronous SendMessage method completes. /// </summary> /// <param name="ar">An IAsyncResult that stores state information and any user defined data for this asynchronous operation.</param> private void SendMessageCallback(IAsyncResult ar) { try{ m_pSmtpClient.EndSendMessage(ar); // Message relayed successfully. Dispose(null); } catch (Exception x) { Dispose(x); } }