original_string: public function userConfirmationNeeded()
      {
          $return_path = $this->_headers['Return-Path'];
  
          /* RFC 3798 [2.1]: Explicit confirmation is needed if there is no
           * Return-Path in the header. Also, "if the message contains more
           * than one Return-Path header, the implementation may [] treat the
           * situation as a failure of the comparison." */
          if (!$return_path || (count($return_path->value) > 1)) {
              return true;
          }
  
          /* RFC 3798 [2.1]: Explicit confirmation is needed if there is more
           * than one distinct address in the Disposition-Notification-To
           * header. */
          $addr_ob = ($hdr = $this->_headers[self::MDN_HEADER])
              ? $hdr->getAddressList(true)
              : array();
  
          switch (count($addr_ob)) {
          case 0:
              return false;
  
          case 1:
              // No-op
              break;
  
          default:
              return true;
          }
  
          /* RFC 3798 [2.1] states that "MDNs SHOULD NOT be sent automatically
           * if the address in the Disposition-Notification-To header differs
           * from the address in the Return-Path header." This comparison is
           * case-sensitive for the mailbox part and case-insensitive for the
           * host part. */
          $ret_ob = new Horde_Mail_Rfc822_Address($return_path->value);
          return (!$ret_ob->valid || !$addr_ob->match($ret_ob));
      }
code: public function userConfirmationNeeded()
      {
          $return_path = $this->_headers['Return-Path'];
  
          /* RFC 3798 [2.1]: Explicit confirmation is needed if there is no
           * Return-Path in the header. Also, "if the message contains more
           * than one Return-Path header, the implementation may [] treat the
           * situation as a failure of the comparison." */
          if (!$return_path || (count($return_path->value) > 1)) {
              return true;
          }
  
          /* RFC 3798 [2.1]: Explicit confirmation is needed if there is more
           * than one distinct address in the Disposition-Notification-To
           * header. */
          $addr_ob = ($hdr = $this->_headers[self::MDN_HEADER])
              ? $hdr->getAddressList(true)
              : array();
  
          switch (count($addr_ob)) {
          case 0:
              return false;
  
          case 1:
              // No-op
              break;
  
          default:
              return true;
          }
  
          /* RFC 3798 [2.1] states that "MDNs SHOULD NOT be sent automatically
           * if the address in the Disposition-Notification-To header differs
           * from the address in the Return-Path header." This comparison is
           * case-sensitive for the mailbox part and case-insensitive for the
           * host part. */
          $ret_ob = new Horde_Mail_Rfc822_Address($return_path->value);
          return (!$ret_ob->valid || !$addr_ob->match($ret_ob));
      }
code_tokens: public function userConfirmationNeeded ( ) { $ return_path = $ this -> _headers [ 'Return-Path' ] ; /* RFC 3798 [2.1]: Explicit confirmation is needed if there is no
           * Return-Path in the header. Also, "if the message contains more
           * than one Return-Path header, the implementation may [] treat the
           * situation as a failure of the comparison." */ if ( ! $ return_path || ( count ( $ return_path -> value ) > 1 ) ) { return true ; } /* RFC 3798 [2.1]: Explicit confirmation is needed if there is more
           * than one distinct address in the Disposition-Notification-To
           * header. */ $ addr_ob = ( $ hdr = $ this -> _headers [ self :: MDN_HEADER ] ) ? $ hdr -> getAddressList ( true ) : array ( ) ; switch ( count ( $ addr_ob ) ) { case 0 : return false ; case 1 : // No-op break ; default : return true ; } /* RFC 3798 [2.1] states that "MDNs SHOULD NOT be sent automatically
           * if the address in the Disposition-Notification-To header differs
           * from the address in the Return-Path header." This comparison is
           * case-sensitive for the mailbox part and case-insensitive for the
           * host part. */ $ ret_ob = new Horde_Mail_Rfc822_Address ( $ return_path -> value ) ; return ( ! $ ret_ob -> valid || ! $ addr_ob -> match ( $ ret_ob ) ) ; }
docstring: Is user input required to send the MDN?
  Explicit confirmation is needed in some cases to prevent mail loops
  and the use of MDNs for mail bombing.
  
  @return boolean  Is explicit user input required to send the MDN?
docstring_tokens: Is user input required to send the MDN? Explicit confirmation is needed in some cases to prevent mail loops and the use of MDNs for mail bombing .