Answers.Body: <p>I'm about 99% sure that if you swap from using <code>sendmail</code> to SMTP, or almost any of the other mail transports in the "Mail Adaptors" category in the Craft 3 Plugin Store (SES, Postmark, Mandrill), they won't end up going through <code>proc_open</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-08T00:23:52.330Z
Answers.LastActivityDate: 2018-05-08T00:23:52.330Z
Answers.UserDisplayName: Brad Bell
Body: <p>I get the following error upon submit of the contact form (Pixel and Tonic's version).</p>
  
  <blockquote>
    <p>proc_open() has been disabled for security reasons</p>
  </blockquote>
  
  <p>Using Craft 3.0.5 and Contact Form 2.1.1. Email is being sent by Sendmail</p>
  
  <p>Client's website host are not willing to enable <code>proc_open</code>. Is anyone aware of a simple way around this?</p>
  
  <p>Here's the Stack Trace:</p>
  
  <pre><code>yii\base\ErrorException: proc_open() has been disabled for security reasons in /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:296
  Stack trace:
  #0 /home/blahblah/vendor/craftcms/cms/src/web/ErrorHandler.php(84): yii\base\ErrorHandler-&gt;handleError(2, 'proc_open() has...', '/home/blahblah/...', 296)
  #1 [internal function]: craft\web\ErrorHandler-&gt;handleError(2, 'proc_open() has...', '/home/blahblah/...', 296, Array)
  #2 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(296): proc_open('/usr/sbin/sendm...', Array, Array)
  #3 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(58): Swift_Transport_StreamBuffer-&gt;establishProcessConnection()
  #4 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(126): Swift_Transport_StreamBuffer-&gt;initialize(Array)
  #5 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php(52): Swift_Transport_AbstractSmtpTransport-&gt;start()
  #6 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(67): Swift_Transport_SendmailTransport-&gt;start()
  #7 /home/blahblah/vendor/yiisoft/yii2-swiftmailer/src/Mailer.php(151): Swift_Mailer-&gt;send(Object(Swift_Message))
  #8 /home/blahblah/vendor/yiisoft/yii2/mail/BaseMailer.php(263): yii\swiftmailer\Mailer-&gt;sendMessage(Object(craft\mail\Message))
  #9 /home/blahblah/vendor/craftcms/cms/src/mail/Mailer.php(159): yii\mail\BaseMailer-&gt;send(Object(craft\mail\Message))
  #10 /home/blahblah/vendor/craftcms/contact-form/src/Mailer.php(100): craft\mail\Mailer-&gt;send(Object(craft\mail\Message))
  #11 /home/blahblah/vendor/craftcms/contact-form/src/controllers/SendController.php(51): craft\contactform\Mailer-&gt;send(Object(craft\contactform\models\Submission))
  #12 [internal function]: craft\contactform\controllers\SendController-&gt;actionIndex()
  #13 /home/blahblah/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
  #14 /home/blahblah/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction-&gt;runWithParams(Array)
  #15 /home/blahblah/vendor/craftcms/cms/src/web/Controller.php(76): yii\base\Controller-&gt;runAction('', Array)
  #16 /home/blahblah/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller-&gt;runAction('', Array)
  #17 /home/blahblah/vendor/craftcms/cms/src/web/Application.php(272): yii\base\Module-&gt;runAction('contact-form/se...', Array)
  #18 /home/blahblah/vendor/craftcms/cms/src/web/Application.php(520): craft\web\Application-&gt;runAction('contact-form/se...', Array)
  #19 /home/blahblah/vendor/craftcms/cms/src/web/Application.php(256): craft\web\Application-&gt;_processActionRequest(Object(craft\web\Request))
  #20 /home/blahblah/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application-&gt;handleRequest(Object(craft\web\Request))
  #21 /home/blahblah/web/index.php(21): yii\base\Application-&gt;run()
  #22 {main}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-05-01T18:13:32.590Z
Comments.Text: Is this Contact Form 1 (for Craft 2) or Contact Form 2 (for Craft 3). Can you edit the question to share the full stack trace leading up to the error? What mail protocol are you using under Settings->Email in the Control Panel?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-03T05:00:08.783Z
Comments.Text: Thanks @BradBell. Have updated questions with requested info.
Comments.UserDisplayName: benb
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-07T16:52:52.727Z
Comments.Text: Longer term, look for new hosting for your client imo.
Comments.UserDisplayName: andrew.welch
Tags: <plugin-contactform>
Title: proc_open error with the Contact Form
ThreadText: # proc_open error with the Contact Form
  
  (Asked by: username_0 on 2018-05-01)
  
  I get the following error upon submit of the contact form (Pixel and Tonic's version).
  
  > proc\_open() has been disabled for security reasons
  
  Using Craft 3.0.5 and Contact Form 2.1.1. Email is being sent by Sendmail
  
  Client's website host are not willing to enable `proc_open`. Is anyone aware of a simple way around this?
  
  Here's the Stack Trace:
  
  ```
  yii\base\ErrorException: proc_open() has been disabled for security reasons in /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:296
  Stack trace:
  #0 /home/blahblah/vendor/craftcms/cms/src/web/ErrorHandler.php(84): yii\base\ErrorHandler->handleError(2, 'proc_open() has...', '/home/blahblah/...', 296)
  #1 [internal function]: craft\web\ErrorHandler->handleError(2, 'proc_open() has...', '/home/blahblah/...', 296, Array)
  #2 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(296): proc_open('/usr/sbin/sendm...', Array, Array)
  #3 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(58): Swift_Transport_StreamBuffer->establishProcessConnection()
  #4 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(126): Swift_Transport_StreamBuffer->initialize(Array)
  #5 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php(52): Swift_Transport_AbstractSmtpTransport->start()
  #6 /home/blahblah/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(67): Swift_Transport_SendmailTransport->start()
  #7 /home/blahblah/vendor/yiisoft/yii2-swiftmailer/src/Mailer.php(151): Swift_Mailer->send(Object(Swift_Message))
  #8 /home/blahblah/vendor/yiisoft/yii2/mail/BaseMailer.php(263): yii\swiftmailer\Mailer->sendMessage(Object(craft\mail\Message))
  #9 /home/blahblah/vendor/craftcms/cms/src/mail/Mailer.php(159): yii\mail\BaseMailer->send(Object(craft\mail\Message))
  #10 /home/blahblah/vendor/craftcms/contact-form/src/Mailer.php(100): craft\mail\Mailer->send(Object(craft\mail\Message))
  #11 /home/blahblah/vendor/craftcms/contact-form/src/controllers/SendController.php(51): craft\contactform\Mailer->send(Object(craft\contactform\models\Submission))
  #12 [internal function]: craft\contactform\controllers\SendController->actionIndex()
  #13 /home/blahblah/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
  #14 /home/blahblah/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
  #15 /home/blahblah/vendor/craftcms/cms/src/web/Controller.php(76): yii\base\Controller->runAction('', Array)
  #16 /home/blahblah/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('', Array)
  #17 /home/blahblah/vendor/craftcms/cms/src/web/Application.php(272): yii\base\Module->runAction('contact-form/se...', Array)
  #18 /home/blahblah/vendor/craftcms/cms/src/web/Application.php(520): craft\web\Application->runAction('contact-form/se...', Array)
  #19 /home/blahblah/vendor/craftcms/cms/src/web/Application.php(256): craft\web\Application->_processActionRequest(Object(craft\web\Request))
  #20 /home/blahblah/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
  #21 /home/blahblah/web/index.php(21): yii\base\Application->run()
  #22 {main}
  
  ```
  
  **Tags:** plugin-contactform
  
  > **Comments:**
  > **username_1**: Is this Contact Form 1 (for Craft 2) or Contact Form 2 (for Craft 3). Can you edit the question to share the full stack trace leading up to the error? What mail protocol are you using under Settings->Email in the Control Panel?  
  > **username_0**: Thanks @username_1. Have updated questions with requested info.  
  > **username_2**: Longer term, look for new hosting for your client imo.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-05-08. Score: 1
  
  I'm about 99% sure that if you swap from using `sendmail` to SMTP, or almost any of the other mail transports in the "Mail Adaptors" category in the Craft 3 Plugin Store (SES, Postmark, Mandrill), they won't end up going through `proc_open`.
  
  
  ---
  
  