Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class PhabricatorMailSendmailAdapter extends PhabricatorMailAdapter { co..

Decoded Output download

<?php

final class PhabricatorMailSendmailAdapter
  extends PhabricatorMailAdapter {

  const ADAPTERTYPE = 'sendmail';

  public function getSupportedMessageTypes() {
    return array(
      PhabricatorMailEmailMessage::MESSAGETYPE,
    );
  }

  public function supportsMessageIDHeader() {
    return $this->guessIfHostSupportsMessageID(
      $this->getOption('message-id'),
      null);
  }

  protected function validateOptions(array $options) {
    PhutilTypeSpec::checkMap(
      $options,
      array(
        'message-id' => 'bool|null',
      ));
  }

  public function newDefaultOptions() {
    return array(
      'message-id' => null,
    );
  }

  /**
   * @phutil-external-symbol class PHPMailerLite
   */
  public function sendMessage(PhabricatorMailExternalMessage $message) {
    $root = phutil_get_library_root('phabricator');
    $root = dirname($root);
    require_once $root.'/externals/phpmailer/class.phpmailer-lite.php';

    $mailer = PHPMailerLite::newFromMessage($message);
    $mailer->Send();
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorMailSendmailAdapter
  extends PhabricatorMailAdapter {

  const ADAPTERTYPE = 'sendmail';

  public function getSupportedMessageTypes() {
    return array(
      PhabricatorMailEmailMessage::MESSAGETYPE,
    );
  }

  public function supportsMessageIDHeader() {
    return $this->guessIfHostSupportsMessageID(
      $this->getOption('message-id'),
      null);
  }

  protected function validateOptions(array $options) {
    PhutilTypeSpec::checkMap(
      $options,
      array(
        'message-id' => 'bool|null',
      ));
  }

  public function newDefaultOptions() {
    return array(
      'message-id' => null,
    );
  }

  /**
   * @phutil-external-symbol class PHPMailerLite
   */
  public function sendMessage(PhabricatorMailExternalMessage $message) {
    $root = phutil_get_library_root('phabricator');
    $root = dirname($root);
    require_once $root.'/externals/phpmailer/class.phpmailer-lite.php';

    $mailer = PHPMailerLite::newFromMessage($message);
    $mailer->Send();
  }

}

Function Calls

None

Variables

None

Stats

MD5 28730c6c10d9a2f0bc2080143dbc389a
Eval Count 0
Decode Time 84 ms