Home Forums Porto Template Contact Form not working

This topic contains 5 replies, has 2 voices, and was last updated by  jmanf47 2 hours, 29 minutes ago. This post has been viewed 60 times

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10022368

    jmanf47
    Participant

    Hi

    I am using the Contact Form on the Contact Us page and and the Advanced Contact Form on the Member Registration pages.

    With Contact form I was getting the message {“response”:”success”} so I made the changes your replied to #10022120, now I just get a blank screen.

    With the Advanced Contact Form I am getting this:
    Error! There was an error sending your message. (SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting)

    and I really don’t know why.

    Please can you help?

    Many thanks

    Jane



    Template Version: 5.7.2
    #10022376

    Support2
    Keymaster

    Hello Jane,

    1) Basic Contact Form:
    Return your code to the state that show the blank page with {“response”:”success”}. This was correct, just was missing the script view.contact.js.
    Then, add the script view.contact.js on footer of document, like the image below:

    2) Advanced Contact Form:
    Basically the error “SMTP Connect() failed” can be caused by various motives, that you can read here:
    https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#smtp-error-could-not-connect-to-smtp-host

    Please verify on link above if one of the explained items can be the cause for your issue.
    If still not solve, please send the code of your members registration page for us, you can use a tool like http://pastebin.com.

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

    Kind Regards,

    Rodrigo.


    #10022418

    jmanf47
    Participant

    Hi Rodrigo

    Many thanks for your email.

    I have resolved the problem with the Contact Form as you advised.

    I have now got the Advanced form working, but I need to upload 2 files and only the 2nd file comes through in the email.

    I am sending the pastebin link in a private reply.

    Many thanks

    jmanf47


    #10022419

    jmanf47
    Participant
    This reply has been marked as private.
    #10022431

    Support2
    Keymaster

    Hello Jane,

    1) Rename the second attachment field to “attachment2”, like the code below:

    <div class="form-group">
    	<div class="col-md-4">
    		<label>Company Accounts *</label>
    		<input type="file" name="attachment2" id="attachment2">
    	</div>
    </div>

    2) On PHP part, add the code below:

    if (isset($_FILES['attachment2']) && $_FILES['attachment2']['error'] == UPLOAD_ERR_OK) {
    	$mail->AddAttachment($_FILES['attachment2']['tmp_name'], $_FILES['attachment2']['name']);
    }

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

    Kind Regards,

    Rodrigo / Okler Team.


    #10022442

    jmanf47
    Participant
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)