Home Forums Porto Template problem section contact onepage

This topic contains 7 replies, has 2 voices, and was last updated by  Support2 2 days, 10 hours ago. This post has been viewed 87 times

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #10027756

    andreago
    Participant

    considering that the index-one-page contact form does not work,
    I want to replace the index-one-page contact form by the advanced contact.

    If this is impossible, I would like the index-one-page form to work with a capcha google.
    I’ll appreciate your prompt response
    regards
    Andrea


    #10027759

    Support2
    Keymaster

    Hello Andrea, thanks for your purchase.

    The contact form basic should work. We did a test in your website and it’s returning the following error:

    That error occurs trying to use the ‘mail’ built-in php mail() codepath, if the mail function fails. Could also be that your php isn’t properly configured for mail(). Our suggestion for you is contact your hosting provider to check that.

    Regarding the Google Recaptcha, please follow the instructions on this FAQ topic below:

    Please, try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    #10027770

    andreago
    Participant
    This reply has been marked as private.
    #10027778

    Support2
    Keymaster

    Hello,

    Now the previous error was fixed.

    According your hosting instructions the SMTP Port should be 465 and not 587 for secure settings. So please try changing the port to:

    $mail->Port = 465;

    Please, try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    #10027806

    andreago
    Participant

    I changed it and it still does not work
    ——————————-

    // Step 1 – Enter your email address below.
    $email = ‘contacto@altofaro.cl’;

    // If the e-mail is not working, change the debug option to 2 | $debug = 2;
    $debug = 2;

    $subject = $_POST[‘subject’];

    $fields = array(
    0 => array(
    ‘text’ => ‘Name’,
    ‘val’ => $_POST[‘name’]
    ),
    1 => array(
    ‘text’ => ‘Email address’,
    ‘val’ => $_POST[’email’]
    ),
    2 => array(
    ‘text’ => ‘Message’,
    ‘val’ => $_POST[‘message’]
    )
    );

    $message = ”;

    foreach($fields as $field) {
    $message .= $field[‘text’].”: ” . htmlspecialchars($field[‘val’], ENT_QUOTES) . “<br>\n”;
    }

    $mail = new PHPMailer(true);

    try {

    $mail->SMTPDebug = $debug; // Debug Mode

    // Step 2 (Optional) – If you don’t receive the email, try to configure the parameters below:

    $mail->IsSMTP(); // Set mailer to use SMTP
    $mail->Host = ‘mail.altofaro.cl’; // Specify main and backup server
    $mail->SMTPAuth = true; // Enable SMTP authentication
    $mail->Username = ‘contacto@altofaro.cl’; // SMTP username
    $mail->Password = ‘Altoalfaro123’; // SMTP password
    $mail->SMTPSecure = ‘ssl’; // Enable encryption, ‘ssl’ also accepted
    $mail->Port = 465; // TCP port to connect to

    $mail->AddAddress($email); // Add another recipient

    //$mail->AddAddress(‘person2@domain.com’, ‘Person 2’); // Add a secondary recipient
    //$mail->AddCC(‘person3@domain.com’, ‘Person 3’); // Add a “Cc” address.
    //$mail->AddBCC(‘person4@domain.com’, ‘Person 4’); // Add a “Bcc” address.

    $mail->SetFrom($email, $_POST[‘name’]);
    $mail->AddReplyTo($_POST[’email’], $_POST[‘name’]);

    $mail->IsHTML(true); // Set email format to HTML

    $mail->CharSet = ‘UTF-8’;

    $mail->Subject = $subject;
    $mail->Body = $message;

    $mail->Send();
    $arrResult = array (‘response’=>’success’);

    } catch (phpmailerException $e) {
    $arrResult = array (‘response’=>’error’,’errorMessage’=>$e->errorMessage());
    } catch (Exception $e) {
    $arrResult = array (‘response’=>’error’,’errorMessage’=>$e->getMessage());
    }

    if ($debug == 0) {
    echo json_encode($arrResult);
    }
    —————
    plis helpme


    #10027814

    Support2
    Keymaster

    Hello,

    Please, can you send the FTP access of your server for us ? Username, Password and Host. So we can make some tests and help you with that.

    Send the information as private message or if you prefer to my email maaprote@gmail.com

    Kind Regards,

    Rodrigo.


    #10027819

    andreago
    Participant
    This reply has been marked as private.
    #10027821

    Support2
    Keymaster

    Hello,

    Great! This mean that the contact form it’s working.
    Now you just need change the variable $debug to:

    $debug = 0;

    Please, try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


Viewing 8 posts - 1 through 8 (of 8 total)