inc/class-Inform_About_Content.php
public function inform_about_comment( $comment_id = FALSE, $comment_status = FALSE ) {

		if ( ! $comment_id ) {
			return $comment_id;
		}

		// get data from current comment
		$comment_data = get_comment( $comment_id );
		// if comment status is approved
		if ( '1' !== $comment_data->comment_approved && ! $comment_status ) {
			return $comment_id;
		}

		// get data from post to this comment
		$post_data = get_post( $comment_data->comment_post_ID );
		// the commenter
		$commenter = array(
			'name'  => 'Annonymous',
			'email' => '',
			'url'   => ''
		);

		if ( 0 != $comment_data->user_id && $user = get_userdata( $comment_data->user_id ) ) {
			// the comment author
			$user                 = get_userdata( $comment_data->user_id );
			$commenter[ 'name' ]  = get_the_author_meta( 'display_name', $user->ID );
			$commenter[ 'email' ] = $user->data->user_email;
			$commenter[ 'url' ]   = $user->data->user_url;
		} else {
			if ( ! empty( $comment_data->comment_author ) ) {
				$commenter[ 'name' ] = $comment_data->comment_author;
			}

			# don't propagate email-address of non-registered users by default
			if ( ! empty( $comment_data->comment_author_email ) ) {
				if ( TRUE === apply_filters( 'iac_comment_author_email_to_header', FALSE ) ) {
					$commenter[ 'email' ] = $comment_data->comment_author_email;
				}
			}

			if ( ! empty( $comment_data->comment_author_url ) ) {
				$commenter[ 'url' ] = $comment_data->comment_author_url;
			}
		}

		// email addresses
		$to = $this->get_members( $commenter[ 'email' ], 'comment' );
		if ( empty( $to ) ) {
			return $comment_id;
		}

		// email subject
		$subject = get_bloginfo( 'name' ) . ': ' . get_the_title( $post_data->ID );
		// message content
		$message = $comment_data->comment_content;
		// create header data
		$headers = array();
		if ( ! empty( $commenter[ 'email' ] ) ) {
			$headers[ 'From' ] =
				$commenter[ 'name' ] .
				' (' . get_bloginfo( 'name' ) . ')' .
				' <' . $commenter[ 'email' ] . '>';
		} else {
			$headers[ 'From' ] =
				$commenter[ 'name' ] .
				' (' . get_bloginfo( 'name' ) . ')' .
				' <' . get_option( 'admin_email' ) . '>';
		}

		if ( $this->options[ 'send_by_bcc' ] ) {
			#copy list of recipients to 'bcc'
			$bcc = $to;
			# set a 'To' header
			$to               = empty( $this->options[ 'bcc_to_recipient' ] )
				? get_bloginfo( 'admin_email' )
				: $this->options[ 'bcc_to_recipient' ];
			$headers[ 'Bcc' ] = $bcc;
		}

		$to          = apply_filters( 'iac_comment_to', $to, $this->options, $comment_id );
		$subject     = apply_filters( 'iac_comment_subject', $subject, $this->options, $comment_id );
		$message     = apply_filters( 'iac_comment_message', $message, $this->options, $comment_id );
		$headers     = apply_filters( 'iac_comment_headers', $headers, $this->options, $comment_id );
		$attachments = apply_filters( 'iac_comment_attachments', array(), $this->options, $comment_id );
		$signature   = apply_filters( 'iac_comment_signature', '', $this->options, $comment_id );

		$this->options[ 'static_options' ][ 'object' ] = array( 'id' => $comment_id, 'type' => 'comment' );

		$this->send_mail(
			$to,
			$subject,
			$this->append_signature( $message, $signature ),
			$headers,
			$attachments
		);

		return $comment_id;
	}
public function inform_about_comment( $comment_id = FALSE, $comment_status = FALSE ) {

		if ( ! $comment_id ) {
			return $comment_id;
		}

		// get data from current comment
		$comment_data = get_comment( $comment_id );
		// if comment status is approved
		if ( '1' !== $comment_data->comment_approved && ! $comment_status ) {
			return $comment_id;
		}

		// get data from post to this comment
		$post_data = get_post( $comment_data->comment_post_ID );
		// the commenter
		$commenter = array(
			'name'  => 'Annonymous',
			'email' => '',
			'url'   => ''
		);

		if ( 0 != $comment_data->user_id && $user = get_userdata( $comment_data->user_id ) ) {
			// the comment author
			$user                 = get_userdata( $comment_data->user_id );
			$commenter[ 'name' ]  = get_the_author_meta( 'display_name', $user->ID );
			$commenter[ 'email' ] = $user->data->user_email;
			$commenter[ 'url' ]   = $user->data->user_url;
		} else {
			if ( ! empty( $comment_data->comment_author ) ) {
				$commenter[ 'name' ] = $comment_data->comment_author;
			}

			# don't propagate email-address of non-registered users by default
			if ( ! empty( $comment_data->comment_author_email ) ) {
				if ( TRUE === apply_filters( 'iac_comment_author_email_to_header', FALSE ) ) {
					$commenter[ 'email' ] = $comment_data->comment_author_email;
				}
			}

			if ( ! empty( $comment_data->comment_author_url ) ) {
				$commenter[ 'url' ] = $comment_data->comment_author_url;
			}
		}

		// email addresses
		$to = $this->get_members( $commenter[ 'email' ], 'comment' );
		if ( empty( $to ) ) {
			return $comment_id;
		}

		// email subject
		$subject = get_bloginfo( 'name' ) . ': ' . get_the_title( $post_data->ID );
		// message content
		$message = $comment_data->comment_content;
		// create header data
		$headers = array();
		if ( ! empty( $commenter[ 'email' ] ) ) {
			$headers[ 'From' ] =
				$commenter[ 'name' ] .
				' (' . get_bloginfo( 'name' ) . ')' .
				' <' . $commenter[ 'email' ] . '>';
		} else {
			$headers[ 'From' ] =
				$commenter[ 'name' ] .
				' (' . get_bloginfo( 'name' ) . ')' .
				' <' . get_option( 'admin_email' ) . '>';
		}

		if ( $this->options[ 'send_by_bcc' ] ) {
			#copy list of recipients to 'bcc'
			$bcc = $to;
			# set a 'To' header
			$to               = empty( $this->options[ 'bcc_to_recipient' ] )
				? get_bloginfo( 'admin_email' )
				: $this->options[ 'bcc_to_recipient' ];
			$headers[ 'Bcc' ] = $bcc;
		}

		$to          = apply_filters( 'iac_comment_to', $to, $this->options, $comment_id );
		$subject     = apply_filters( 'iac_comment_subject', $subject, $this->options, $comment_id );
		$message     = apply_filters( 'iac_comment_message', $message, $this->options, $comment_id );
		$headers     = apply_filters( 'iac_comment_headers', $headers, $this->options, $comment_id );
		$attachments = apply_filters( 'iac_comment_attachments', array(), $this->options, $comment_id );
		$signature   = apply_filters( 'iac_comment_signature', '', $this->options, $comment_id );

		$this->options[ 'static_options' ][ 'object' ] = array( 'id' => $comment_id, 'type' => 'comment' );

		$this->send_mail(
			$to,
			$subject,
			$this->append_signature( $message, $signature ),
			$headers,
			$attachments
		);

		return $comment_id;
	}
Send mail, if approved a new comment

@since   0.0.1
@uses    get_comment, get_post, get_userdata, get_author_name, get_option, wp_mail, get_permalink

@param   string|bool $comment_id
@param   boolean $comment_status

@return  string $comment_id