sodesign

Members
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sodesign

  1. I guess the different case may have allowed it to sneak through - I can confirm I'm not seeing the issue now that I've renamed my function. I'll follow up if the issue remains resolved. Thanks for your help!
  2. Could it be to do with the fact I've named the function in my template sendMail? It only just occurred to me that it's the same as the function used by wireMail.
  3. Great, thank you for confirming. Is there anything I can do in the meantime to get around this? I'm on the 3.0.79 dev branch
  4. Thanks for the swift reply! Prior to trying to send a form, I see: Function SendMail($to, $subject, $body, $headers, $return_path) Then once I have tried to send a form, I see this: Function \ProcessWire\sendmail($to, $subject, $body, $headers, $return_path) The partial which handles the ajax request is like this: <?php namespace ProcessWire; use Valitron\Validator; function getInput($modules, $sanitizer, $input, $user) { ... $v = new Validator([ ... ]) ... $formFields = [...] return $formFields; // This contains the sanitized form fields content and the validation results } function sendMail($formFields, $modules, $pages, $sanitizer) { ... if ($v->validate()) { ... $mail = wireMail() ->to($contactFormRecipient) ->header('Reply-To', $email) ->subject(ucwords($mailer_subject)) ->bodyHTML($messageHTML); ... } } } $formFields = getInput($modules, $sanitizer, $input, $user); $output = sendMail($formFields, $modules, $pages, $sanitizer); if ($output['sent']) { echo json_encode(array(...)); } else { echo json_encode(array(...)); } Does the namespaced compiled function look right to you?
  5. Hi, I'm having an issue with the 'Test Settings' feature. Some background: I have a contact form which sends an email (triggered by ajax), which seems to work a couple of times, but then starts throwing 500 errors on send. At the same time, once the contact forms starts throwing 500 errors, clicking 'Test settings' in the module settings panel throws the same error: I'm not sure where to start finding the source of this issue - it seems that sometimes clearing compiled files solves the issue temporarily, but beyond this I'm not sure what to do. We're running the latest Dev branch, but swapping to Master didn't prevent the issue. Any advice on how to resolve this would be much appreciated! Thanks, Tom
  6. Makes perfect sense