title: PrestaShop 1.7 An error occurred while sending the message, please try again
body: <p>In my PrestaShop in Advanced Parameters E-mail e send tests messages with success.</p>
  
  <p>But in my contact page email form when I send a email I receive a message </p>
  
  <blockquote>
    <p>an error occurred while sending the message, please try again.</p>
  </blockquote>
  
  <p>My troubleshooting atttempt:  </p>
  
  <blockquote>
    <p>In line 418 in the file "modules/contactform/contactform.php"<br>
    $this→context→controller→errors[] = $this→trans('An error occurred while sending the message, please try again.', array(), 'Modules.Contactform.Shop');</p>
  </blockquote>
  
  <p>I replace by this code:</p>
  
  <pre><code>$this→context→controller→errors[] = $errorMessage = error_get_last()['message'];
  </code></pre>
  
  <p>Then I sent an email in my Contacts page and I got the following error: </p>
  
  <blockquote>
    <p>Undefined property: stdClass::$id_shop</p>
  </blockquote>
  
  <p>How can I resolve this?</p>
  
  <p><img src="https://i.stack.imgur.com/gZWGe.jpg" alt="enter image description here"></p>