title: Php Mail wont work on Google App Engine Flex (no errors displayed)
body: <p>I have a wordpress site running on Google App Engine flex. I'm trying to use the php mail() function for a simple contact form.</p>
  
  <p>I have a block like so:</p>
  
  <pre><code>   if ( mail( $to, $subject, $message, $headers ) ) {
        //stuff
     } else {
        error_reporting(-1);
        ini_set('display_errors', 'On');
        set_error_handler("var_dump");
        var_dump(error_get_last());
        echo '&lt;pre&gt;';
        print_r (error_get_last());
        echo '&lt;/pre&gt;';
     }
  </code></pre>
  
  <p>I've tried using different $from emails with no luck. I get a NULL error message displayed in response. These are settings i'm using. I've tried using my admin @gmail account and now switched to the appsot@gservice. I don't see any mail related items logged in dashboard</p>
  
  <pre><code>$to = 'myemail@gmail.com';
  $from = "my-project@appspot.gserviceaccount.com";
  $subject = "New Application";
  $message = 'test';
  $headers  = 'MIME-Version: 1.0' . "\r\n";
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  $headers .= "From: ".$from."\r\n"."X-Mailer: php";
  </code></pre>
  
  <p>Keep in mind this is the flex environment. Google only seems to have guides on using third party services for sending bulk email.</p>
  
  <p>this mail function should work right? Do I have to edit my app.yaml or php.ini?</p>
  
  <p>App.yaml</p>
  
  <pre><code>runtime: php
  env: flex
  
  manual_scaling:
    instances: 1
  
  handlers:
  - url: /(.*\.(htm|html|css|js))$
    static_files: wordpress/\1
    upload: wordpress/.*\.(htm|html|css|js)$
    application_readable: true
  
  - url: /wp-content/(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))$
    static_files: wordpress/wp-content/\1
    upload: wordpress/wp-content/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
    application_readable: true
  
  - url: /(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))$
    static_files: wordpress/\1
    upload: wordpress/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
    application_readable: true
  
  - url: /wp-includes/images/media/(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))$
    static_files: wordpress/wp-includes/images/media/\1
    upload: wordpress/wp-includes/images/media/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
    application_readable: true
  
  - url: /wp-admin/(.+)
    script: wordpress/wp-admin/\1
    secure: always
  
  - url: /wp-admin/
    script: wordpress/wp-admin/index.php
    secure: always
  
  - url: /wp-login.php
    script: wordpress/wp-login.php
    secure: always
  
  - url: /wp-cron.php
    script: wordpress/wp-cron.php
    login: admin
  
  - url: /xmlrpc.php
    script: wordpress/xmlrpc.php
  
  - url: /wp-(.+).php
    script: wordpress/wp-\1.php
  
  - url: /(.+)?/?
    script: wordpress/index.php
  
  beta_settings:
    cloud_sql_instances: myproject-:us-east4:my-instance
  
  runtime_config:
    document_root: wordpress
    skip_lockdown_document_root: true
  
  env_variables:
    WHITELIST_FUNCTIONS: escapeshellarg,escapeshellcmd,exec,pclose,popen,shell_exec,phpversion,php_uname
  </code></pre>
  
  <p>php.ini</p>
  
  <pre><code>extension=bcmath.so
  extension=gd.so
  zend_extension=opcache.so
  short_open_tag=On
  upload_max_filesize = 200M
  google_app_engine.disable_readonly_filesystem = 1
  </code></pre>