PHPMailer form failed to load.

9 replies · opened Nov 25, 2019

AAhmedShAntoNov 25, 2019

Greetings, Form showing failed to load in console. What can i do to solve this.

link: mithelagroup.com

SSemicolon WebSTAFFNov 25, 2019

Hello,

We have just tried checking your include/form.php File: https://mithelagroup.com/include/form.php and it appears that the File is not executable. For the Form to work properly, the PHP File needs to be executable. So this issue is not related to Canvas and it is recommended that you contact your Web Hosting Server providers regarding this as they should be able to help you fix this.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

AAhmedShAntoNov 26, 2019

Showing this now.

AAhmedShAntoNov 26, 2019

Please check this

SSemicolon WebSTAFFNov 26, 2019

Hello,

Thanks for your Patience!

Now, since your include/form.php File is returning a 500 Internal Server Error, it indicates that your Server does not support some PHP functionalities or there is an error in the PHP File while editing the codes. Please consider adding the following code at the very top of your include/form.php File:

error_reporting(E_ALL);

which should display all the possible errors. Please notify us about the Error Message you see, after going through the process above, so that we can provide you with more assistance on this.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

AAhmedShAntoNov 27, 2019

in NGINX Error Log: 2019/11/27 01:48:38 [error] 1928#0: *320 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected '@', expecting ']' in /opt/bitnami/nginx/html/include/phpmailer/src/PHPMailer.php on line 559" while reading response header from upstream, client: 113.xx.xx.xx, server: mithelagroup.com, request: "POST /include/form.php HTTP/2.0", upstream: "fastcgi://unix:/opt/bitnami/php/var/run/www.sock:", host: "mithelagroup.com", referrer: "https://mithelagroup.com/"

Picture showing console error.

AAhmedShAntoNov 27, 2019

Hello Please check now. Maybe PHP is working fine. Re uploaded the file.
Now. PHPMailer.php and SMTP.php is intact. I just added below lines in form.php

error_reporting(E_ALL);

require 'phpmailer/src/PHPMailer.php';
require 'phpmailer/src/SMTP.php';

/*-------------------------------------------------
        Receiver's Email
---------------------------------------------------*/

$toemails = array();

$toemails[] = array(
                                'email' => 'shanto@mithelagroup.com', // Your Email Address
                                'name' => 'Ahmed ShAnto' // Your Name
                        );

/*-------------------------------------------------
        Sender's Email
---------------------------------------------------*/

$fromemail = array(
                                'email' => 'sysop@mithelagroup.com', // Company's Email Address (preferably currently used Domain Name)
                                'name' => 'MTIL WebMaster' // Company Name
                        );

/*-------------------------------------------------
        reCaptcha
---------------------------------------------------*/

// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = ''; // Your reCaptcha Secret

/*-------------------------------------------------
        PHPMailer Initialization
---------------------------------------------------*/

$mail = new PHPMailer();

/* Add your SMTP Codes after this Line*/
$mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->Host = 'smtp.office365.com';
$mail->Port = 587;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->Username = "id@domain.com";
$mail->Password = "Email-ID-Pass";

// End of SMTP

Now. Submit button keeps loading.
Please check https://mithelagroup.com in bottom of the page. you will see send mail. Please help if i missed something.

AAhmedShAntoNov 27, 2019

Changed SMTP debug 2 to 0. Now showing this error. But my id pass is okay.

SSemicolon WebSTAFFNov 27, 2019

Hello,

Thanks for more information regarding your error. Based on the Last Updated information you have provided us with, it appears that there is an issue with SMTP and again this is an issue with the Servers and not the code. SMTP connect() typically occurs when the Connect is refused from the SMTP Servers (smtp.office365.com in your case), so make sure your SMTP Authentication details are valid including proper Ports and Encryption (SSL/TLS) or your Source Servers is unable to initiate a Connect to the SMTP Servers. You will need to contact your Web Hosting Providers in these cases.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard