title: proc_open() has been disabled for security reasons problem in laravel mail sending in server
body: <p>I have hosted a laravel project in cpanel(shared hosting) and I've got issue while sending emails with laravel mail function.</p>
  
  <p>My Previous question : <a href="https://stackoverflow.com/questions/53869248/unable-to-send-email-in-laravel-in-server">Unable to send email in laravel in server</a></p>
  
  <p>Now, I don't have swift mailer problem but I've got new issue</p>
  
  <blockquote>
    <p>proc_open() has been disabled for security reasons</p>
  </blockquote>
  
  <p>I've tried normal mail sending in server with following code,</p>
  
  <pre><code>&lt;?php
  $to      = 'sagautam5@gmail.com';
  $subject = 'the subject';
  $message = 'hello';
  $headers = 'From: webmaster@example.com' . "\r\n" .
      'Reply-To: webmaster@example.com' . "\r\n" .
      'X-Mailer: PHP/' . phpversion();
  
  mail($to, $subject, $message, $headers);
  ?&gt; 
  </code></pre>
  
  <p>It works correctly and sends email but when I try following code in laravel</p>
  
  <pre><code>Route::get('testEmail', function ()
  {
  
      $data = [
          'key'     =&gt; 'value'
      ];
  
      Mail::send([], [], function ($message) {
          $message-&gt;from('another@email.com', 'My name');
          $message-&gt;subject('subject');
          $message-&gt;to('sagautam5@gmail.com');
      });
  
      dd(Mail::failures());
  });
  </code></pre>
  
  <p>proc_open() has been disabled for security reasons issue is encountered. </p>
  
  <p><a href="https://i.stack.imgur.com/Shh44.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Shh44.png" alt="Image"></a></p>
  
  <p>I'm not too much familiar with the production server. Any help is appreciated. I'm stuck here from 2 days</p>