Contact form PHP not working. On submit of form it gives error response

**My website URL is:**

**What I’m seeing is:**the file I there but it’s not responding in the form action


I’m using this software:

ftp client

Additional information: the php is to help receive a main when someone fill the form

What is a ‘main’?

1 Like

Also do not use the mail function at all, you are not allowed to. If you want to mail, consider using Google STMP.

1 Like

Sorry typing error I wanna type mail

I just did it…
I unzip the file change the name to PHPMailar and I copy the php and paste it by opening another file with the name contact-form.php in the PHPmailar folder…
I edit it with my Gmail and password…

I upload it back to my htdocs folder and I copy the contact-form.php link and paste in my form action…

When I tried submitting the form it says is currently unable to handle this request error500

Probably there’s an error.

1 Like

Thats the response please what will i do

You’re requiring files by url, No servers would allow to require a file from url, That’s a security risk.

Can you paste the source of contact-info.php here? (put inside ``` and ```)

1 Like

But that link doesn’t show the code of contact-form.php; it only helps reproducing the problem of that file on my side. On that file, on line 6, you should replace require(""); with require("./PHPMailerAutoload.php");, so that the code will work fine.

1 Like

That’s what is there before in the line 6 of the code and it’s not working before I decide to use the URL

I will change it back now and try again

I change it back see the response

I am not good at this smtp shit
The error is referring me back to line 45 of the phpmailerAutoload.php

I don’t know what to do with that line…
I think it’s just a zip file and I shouldn’t be facing problem editing this codes again

The second error means that the SMTP connection to the server failed. If that doesn’t work, change $mail->Port’s value from 587 to 465 and $mail->SMTPSecure’s value from 'tls' to 'ssl' on the file contact-form.php, then enable access for less secure apps in your Google account (only if your Google account doesn’t have two-factor authentication) and lastly follow this link to disable CAPTCHA requests for Gmail on your Google account. Also, edit the file to include your Gmail account credentials, and after that try to test it again.


Just FYI: access for less secure apps is going to be disable in the near future. So it’s recommended to set up Two Factor authentication and create an app password.


I think the admin needs to go through the code in line 45 of the phpautoload.php in the zip file share.
I am not saying it not correct but maybe there is new version of PHPautoload.php i am not good at that but I read one article that ask me to change the code to a new one and it working perfectly now.
Just to avoid unnecessary stress from client


Our own guide still refers to PHPMailer 5.2. That’s an older version, which we recommended for two reasons:

  • We didn’t have PHP 7 at the time yet, and PHPMailer 5.2 worked well on PHP 5.
  • It doesn’t require you to use Composer to install it, which is a benefit if you just want to send email without bothering with Composer.

We would like to rewrite out guide to include a basic contact form with PHPmailer, but that’s still on the todo list.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.