Home Forums Porto Template Contact Form Error

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

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #10030713

    cochn01
    Participant

    Hello,

    I am experiencing an Error when trying to forward a message using the Contact Form. The error is as follows.

    PHPMailer.php on line 304. Would you happen to know what could be causing this?

    Thank you,
    NC


    #10030716

    Support2
    Keymaster

    Hello,

    The issue is the PHP version of your server. The PHPMailer needs a minimum version of PHP 5.5 to works.

    Just update the PHP version in your server and the contact form should works.

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

    Kind Regards,

    Rodrigo.


    #10030721

    cochn01
    Participant

    Hello Rodrigo,

    I wasn’t aware. Site was running off PHP3. I have now updated to PHP6.
    Not sure if it takes a while for it to kick over? But the error is still occurring. Is there another file I need to update other than contact.php?

    Thanks,
    Nina


    #10030726

    Support2
    Keymaster

    Hello Nina,

    We did a new test and now the issue PHP version is resolved.

    Still it’s returning error but it’s not related to the PHP version.

    Try the instructions on the faq topic below:

    If still not resolver your issue, please send all code of your contact-form.php file for us. You can use a service like https://pastebin.com to create a link with your code and share with us.

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

    Kind Regards,

    Rodrigo.


    #10030730

    cochn01
    Participant

    That’s weird…

    I keep getting an error! And according to the referral notes…

    “For emails that are not in the same server as the website (www)) – Uncomment the settings and add the parameters for the SMTP authentication (Make sure you enter the correct settings, contact your email provider to get that information)”

    My email is under the same server… creative@codenyc.net… Could the issue be that my site is going through https server?
    Thanks… I haven’t had this problem before the update… Don’t know why it’s happening now?

    NC


    #10030733

    Support2
    Keymaster

    Hello,

    This is possible.

    In that case my suggestion for you is try using the SMTP settings (get the correct settings with your hosting provider).

    If even so not works, then set the $debug variable to $debug = 2 and paste the error for us here. Also (if smtp not works) send all code of your contact-form.php file for us.

    Kind Regards,

    Rodrigo.


    #10030747

    cochn01
    Participant

    Hello Rodrigo,

    All well and good. But I’m not understanding something.

    The old version before the upgrade worked fine.
    Was there anything different that was done?

    And by the way I already changed to $debug = 2.

    Just trying to understand.

    Thanks,
    Nina


    #10030753

    Support2
    Keymaster

    Hello Nina,

    THe problem is solved ? I did a new test and seems to be not.

    Probably it’s related to some setting in your server that not works with the default PHP mail() function with HTTPS.

    OBS: If the contact form it’s working, change the $debug variable to $debug = 0;. If you mantain with 2 always will return error on the front end (even receiving the emails)

    Kind Regards,

    Rodrigo.


    #10030755

    cochn01
    Participant

    Okay…

    It’s now sending and notification it was sent…

    But when I check email the following error appears in subject line:
    Define subject in php/contract-form.php line 29.

    And with in the contact PHP notes…
    // If contact form don’t has the subject input change the value of subject here
    $subject = ( isset($_POST[‘subject’]) ) ? $_POST[‘subject’] : ‘Define subject in php/contact-form.php line 29’;

    How do I change value?

    It appears this error is showing because Subject Line is not being used in Contact Form. https://codenyc/net.
    As of right now, mail is showing up as spam…

    Thanks again for all your help!
    Nina


    #10030756

    Support2
    Keymaster

    Hello Nina,

    Regarding the subject you are right. This occurs because you don’t have a field for subject on the contact form.

    In that case you can just change the string/text with your appropriate subject, for example:

    $subject = ( isset($_POST[‘subject’]) ) ? $_POST[‘subject’] : ‘Contact Form Received!’;

    Regarding spam:
    Unfortunately this is not controlled on the website code side, but yes trough the server settings. We recommend you contact your hosting provider to check why the emails are being added to the spam folder.

    We hope this helps.

    Kind Regards,

    Rodrigo.


    #10030757

    cochn01
    Participant

    Yep that was it…
    Awesome!! Thank you Rodrigo.

    NC


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