/**
  * Copied from WordPress core
  * Set the from name and email
  */
 public function init()
 {
     parent::init();
     // From email and name
     // If we don't have a name from the input headers
     $this->fromName = 'WordPress';
     /*
      * If we don't have an email from the input headers default to wordpress@$sitename
      * Some hosts will block outgoing mail from this address if it doesn't exist but
      * there's no easy alternative. Defaulting to admin_email might appear to be another
      * option but some hosts may refuse to relay mail from an unknown domain. See
      * https://core.trac.wordpress.org/ticket/5007.
      */
     // Get the site domain and get rid of www.
     $sitename = strtolower($_SERVER['SERVER_NAME']);
     if (substr($sitename, 0, 4) == 'www.') {
         $sitename = substr($sitename, 4);
     }
     $this->fromEmail = 'wordpress@' . $sitename;
 }
 /**
  */
 public function createOverrideMenu(PostmanWizardSocket $socket, $winningRecommendation, $userSocketOverride, $userAuthOverride)
 {
     $overrideItem = parent::createOverrideMenu($socket, $winningRecommendation, $userSocketOverride, $userAuthOverride);
     // push the authentication options into the $overrideItem structure
     $overrideItem['auth_items'] = array(array('selected' => true, 'name' => __('OAuth 2.0 (requires Client ID and Client Secret)', Postman::TEXT_DOMAIN), 'value' => 'oauth2'));
     return $overrideItem;
 }
 /**
  * Creates a single socket for the Wizard to test
  */
 protected function createSocketDefinition($hostname, $port)
 {
     $socket = parent::createSocketDefinition($hostname, $port);
     $socket['smtp'] = true;
     return $socket;
 }