Ejemplo n.º 1
0
        /// <summary>
        /// This method is called when asynchronous MailFrom method completes.
        /// </summary>
        /// <param name="ar">An IAsyncResult that stores state information and any user defined data for this asynchronous operation.</param>
        private void MailFromCallback(IAsyncResult ar)
        {
            try{
                m_pSmtpClient.EndMailFrom(ar);

                m_pSmtpClient.BeginRcptTo(this.To, new AsyncCallback(this.RcptToCallback), null);
            }
            catch (Exception x) {
                Dispose(x);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This method is called when asynchronous MailFrom method completes.
        /// </summary>
        /// <param name="ar">An IAsyncResult that stores state information and any user defined data for this asynchronous operation.</param>
        private void MailFromCallback(IAsyncResult ar)
        {
            try{
                m_pSmtpClient.EndMailFrom(ar);

                m_pSmtpClient.BeginRcptTo(
                    this.To,
                    IsDsnSupported() ? m_pRelayItem.DSN_Notify : SMTP_DSN_Notify.NotSpecified,
                    IsDsnSupported() ? m_pRelayItem.OriginalRecipient : null,
                    new AsyncCallback(this.RcptToCallback),
                    null
                    );
            }
            catch (Exception x) {
                Dispose(x);
            }
        }