• Resolved louislemasson

    (@louislemasson)


    Hi,

    When I send a mail with the form, I receive it but the success message isn’t displayed and the button style animating the dots.

    I have a specific php configuration to send the email with SMTP that could ovewrite some properties i’ve setup to the gutena form block in gutenberg edior :

    add_action('phpmailer_init', 'my_phpmailer_smtp');
    function my_phpmailer_smtp(PHPMailer $phpmailer) {
    $phpmailer->isSMTP();
    $phpmailer->Host = 'ssl0.ovh.net';
    $phpmailer->Port = 465;
    $phpmailer->SMTPSecure = 'ssl';
    $phpmailer->SMTPAuth = true;
    $phpmailer->Username = '[email protected]';
    $phpmailer->Password = '071300#RfDg@';
    $phpmailer->From = "[email protected]";
    $phpmailer->addReplyTo("[email protected]");
    $phpmailer->SMTPDebug = 2; // temp
    }

    I precise that before that php configuration everythings was working correctly (except that gutena form using the wp_mail function and the mail was received as junk).

    I check in the console and found that there is an error when I click on the submit button : “SyntaxError: Unexpected non-whitespace character after JSON at position 4 (line 1 column 5)”

    Thanks for help

    • This topic was modified 5 months, 2 weeks ago by louislemasson.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @louislemasson

    Sorry for the delay and thanks a lot for giving the detailed related to the issue you’re facing.

    I’ve escalated this to my team, and in the meantime, can you help me with the error log so that we can dig deep into finding the root cause?

    Thanks,
    Avi

    Hi @louislemasson

    We checked this with our dev team. We found that the following error is generated by system

    SMTP ERROR: Failed to connect to server: (0)<br>SMTP Error: Could not connect to SMTP host.Failed to connect to server<br>

    It means your WordPress website is unable to establish a connection with the SMTP server.

    This can happen due to incorrect SMTP settings, such as the wrong host, port, username, or password.

    Please check this article to know about the issues this may be occuring

    As you shared: “SyntaxError: Unexpected non-whitespace character after JSON at position 4 (line 1 column 5)” this occurs due to unexpected SMTP ERROR thrown as a response by wordpress.

    Once you fix the SMTP, your issues would be sorted. However, in case of any challenges, feel free to contact us.

    Thanks,
    Avi

    Thread Starter louislemasson

    (@louislemasson)

    The strange thing is that even if the received system message is “SMTP ERROR: Failed to connect to server” i recieve even so the mail…

    Anyway, I’m using back the WP Mail SMTP plugin and it’s working (it wasn’t before), I don’t know why but it looks like the gutena form button doesn’t work correctly with a manual smtp configuration (with the wordpress phpmailer_init hook)

    thanks for your reply

    NB: The password in my code extract have been changed (yes it was correct… I just want to kill my self when i figured out that i’d put it here…)

    Hi @louislemasson

    Thanks for your reply. We understand your concern regarding the manual smtp configuration with Gutena. However, I’d like to inform you that the Gutena Forms submit button is used to only submit the form and does not have any relation to SMTP. It should be working individually.

    Let me know if you have any other questions or still facing the issue, I’ll be happy to help you in getting it fixed.

    Have a good day !

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.