Answers.Body: <p>The problem is the <code>...</code> in your <code>contactform.php</code> file.</p>
  
  <p>The docs use it because they assume you might have some other valid config settings you want to include in that config file, but it's not real code, which is why PHP is choking on it.</p>
  
  <p>Remove the <code>...</code> and you should be set.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-14T02:09:21.533Z
Answers.LastActivityDate: 2016-08-14T02:09:21.533Z
Answers.UserDisplayName: Brad Bell
Body: <p>I've tried creating a <code>contactform.php</code> file with the <a href="https://github.com/pixelandtonic/ContactForm" rel="nofollow">P&amp;T Contact Form plugin</a> and using the code in the documentation to be able to programmatically add recipients. However, when I use this code: </p>
  
  <pre><code>&lt;?php
      namespace Craft;
  
      $toEmail = craft()-&gt;request-&gt;getPost('toEmail');
      $toEmail = craft()-&gt;security-&gt;validateData($toEmail);
  
      return array(
          'toEmail' =&gt; ($toEmail ?: null),
          ...
      );
  </code></pre>
  
  <p>I end up getting a white screen of death and a 500 Internal Server Error. I don't know why it's doing this, I tried editing the permissions of my <code>craft</code> folder and the <code>contactform.php</code> file, but nothing has worked and I keep getting a white screen. </p>
  
  <p>How can I fix this?
  Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-13T01:53:42.610Z
Comments.Text: If you enable [devMode](https://craftcms.com/docs/config-settings#devMode), instead of a white screen, you should get a nice error message with a stack trace. If you don't, can you edit the original question to include your `contactform.php` file?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-13T06:05:37.767Z
Comments.Text: I used the code that I included above and I did also try devMode, but I couldn't get any errors. Where should I go from here? Would there be any problems related to the comma and ellipsis in the array? It was originally included in the source code in the documentation... either way, are there any other things I can try?
Comments.UserDisplayName: Jesse Winton
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-14T02:04:57.143Z
Comments.Text: Yeah, if you don't get any errors with devMode enabled, then it's probably a PHP syntax error in your `contactform.php` file, which is why I asked if you could edit your original question with the contents of that file. ;)
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-14T02:06:08.043Z
Comments.Text: Thanks. Like I said though, what I included above is the complete contents of the `contactform.php`. :) is that not what you need?
Comments.UserDisplayName: Jesse Winton
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-14T02:07:39.957Z
Comments.Text: lol, no that's it. I'm just dense. Will add an answer.
Comments.UserDisplayName: Brad Bell
Tags: <templating><config><php><plugin-contactform><configuration>
Title: contactform.php messing up site
ThreadText: # contactform.php messing up site
  
  (Asked by: username_0 on 2016-08-12)
  
  I've tried creating a `contactform.php` file with the [P&T Contact Form plugin](https://github.com/pixelandtonic/ContactForm) and using the code in the documentation to be able to programmatically add recipients. However, when I use this code:
  
  ```
  <?php
      namespace Craft;
  
      $toEmail = craft()->request->getPost('toEmail');
      $toEmail = craft()->security->validateData($toEmail);
  
      return array(
          'toEmail' => ($toEmail ?: null),
          ...
      );
  
  ```
  
  I end up getting a white screen of death and a 500 Internal Server Error. I don't know why it's doing this, I tried editing the permissions of my `craft` folder and the `contactform.php` file, but nothing has worked and I keep getting a white screen.
  
  How can I fix this?
  Thanks!
  
  **Tags:** templating, config, php, plugin-contactform, configuration
  
  > **Comments:**
  > **username_1**: If you enable [devMode](https://craftcms.com/docs/config-settings#devMode), instead of a white screen, you should get a nice error message with a stack trace. If you don't, can you edit the original question to include your `contactform.php` file?  
  > **username_0**: I used the code that I included above and I did also try devMode, but I couldn't get any errors. Where should I go from here? Would there be any problems related to the comma and ellipsis in the array? It was originally included in the source code in the documentation... either way, are there any other things I can try?  
  > **username_1**: Yeah, if you don't get any errors with devMode enabled, then it's probably a PHP syntax error in your `contactform.php` file, which is why I asked if you could edit your original question with the contents of that file. ;)  
  > **username_0**: Thanks. Like I said though, what I included above is the complete contents of the `contactform.php`. :) is that not what you need?  
  > **username_1**: lol, no that's it. I'm just dense. Will add an answer.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-08-14. Score: 3 | Accepted answer
  
  The problem is the `...` in your `contactform.php` file.
  
  The docs use it because they assume you might have some other valid config settings you want to include in that config file, but it's not real code, which is why PHP is choking on it.
  
  Remove the `...` and you should be set.
  
  
  ---
  
  