Contact form stuck at spinner

7 replies · opened Sep 25, 2018

LlinescttSep 25, 2018

Hi, I've done the instructions and just changed the email & name in sendemail.php ,

I see the animation spinning and I do not get any confirmation nor do I get the email. How can I fix this? https://projectmp.com/

SSemicolon WebSTAFFSep 27, 2018

Hello,

We have just checked out your Website and the issue is that the https://projectmp.com/include/sendemail.php File that processes the Contact Form returns a 500 Internal Server Error which is why you see the Loader Animation Loop on the Contact Form. Please consider adding the following code at the very top of your include/sendemail.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. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

LlinescttSep 27, 2018

I dont see it displaying the error. But In my console, this is what I got:

jquery.js:2 POST https://projectmp.com/one-page/include/sendemail.php 500 (Internal Server Error)
send @ jquery.js:2
ajax @ jquery.js:2
e.fn.ajaxSubmit @ plugins.js:582
submitHandler @ functions.js:3191
d @ plugins.js:654
(anonymous) @ plugins.js:654
dispatch @ jquery.js:2
y.handle @ jquery.js:2
Does this help?

Let me know, thanks

SSemicolon WebSTAFFSep 28, 2018

Hello,

Please make sure that you are adding the error_reporting(E_ALL); inside the PHP Codes.

Please notify us about the Error Message you see, so that we can provide you with more assistance. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

LlinescttSep 28, 2018

error_reporting(E_ALL); { "alert": "error", "message": "An unexpected error occured. Please Try Again later." }

LlinescttSep 28, 2018

sendemail.php code

<?php

use PHPMailer\PHPMailer\PHPMailer;

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

$toemails = array();

$toemails[] = array(
'email' => 'info@esctt.com', // Your Email Address
'name' => 'Andrew Leroux' // Your Name
);

// Form Processing Messages
$message_success = 'We have successfully received your Message and will get Back to you as soon as possible.';

$mail = new PHPMailer();

// If you intend you use SMTP, add your SMTP Code after this Line

if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
if( $_POST['template-contactform-email'] != '' ) {

	$name = isset( $_POST['template-contactform-name'] ) ? $_POST['template-contactform-name'] : '';
	$email = isset( $_POST['template-contactform-email'] ) ? $_POST['template-contactform-email'] : '';
	$phone = isset( $_POST['template-contactform-phone'] ) ? $_POST['template-contactform-phone'] : '';
	$service = isset( $_POST['template-contactform-service'] ) ? $_POST['template-contactform-service'] : '';
	$subject = isset( $_POST['template-contactform-subject'] ) ? $_POST['template-contactform-subject'] : '';
	$message = isset( $_POST['template-contactform-message'] ) ? $_POST['template-contactform-message'] : '';

	$subject = isset($subject) ? $subject : 'New Message From Contact Form';

	$botcheck = $_POST['template-contactform-botcheck'];

	if( $botcheck == '' ) {

		$mail-&gt;SetFrom( $email , $name );
		$mail-&gt;AddReplyTo( $email , $name );
		foreach( $toemails as $toemail ) {
			$mail-&gt;AddAddress( $toemail['email'] , $toemail['name'] );
		}
		$mail-&gt;Subject = $subject;

		$name = isset($name) ? "Name: $name&lt;br&gt;&lt;br&gt;" : '';
		$email = isset($email) ? "Email: $email&lt;br&gt;&lt;br&gt;" : '';
		$phone = isset($phone) ? "Phone: $phone&lt;br&gt;&lt;br&gt;" : '';
		$service = isset($service) ? "Service: $service&lt;br&gt;&lt;br&gt;" : '';
		$message = isset($message) ? "Message: $message&lt;br&gt;&lt;br&gt;" : '';

		$referrer = $_SERVER['HTTP_REFERER'] ? '&lt;br&gt;&lt;br&gt;&lt;br&gt;This Form was submitted from: ' . $_SERVER['HTTP_REFERER'] : '';

		$body = "$name $email $phone $service $message $referrer";

		// Runs only when File Field is present in the Contact Form
		if ( isset( $_FILES['template-contactform-file'] ) && $_FILES['template-contactform-file']['error'] == UPLOAD_ERR_OK ) {
			$mail-&gt;IsHTML(true);
			$mail-&gt;AddAttachment( $_FILES['template-contactform-file']['tmp_name'], $_FILES['template-contactform-file']['name'] );
		}

		// Runs only when reCaptcha is present in the Contact Form
		if( isset( $_POST['g-recaptcha-response'] ) ) {
			$recaptcha_response = $_POST['g-recaptcha-response'];
			$response = file_get_contents( "https://www.google.com/recaptcha/api/siteverify?secret=" . $recaptcha_secret . "&response=" . $recaptcha_response );

			$g_response = json_decode( $response );

			if ( $g_response-&gt;success !== true ) {
				echo '{ "alert": "error", "message": "Captcha not Validated! Please Try Again." }';
				die;
			}
		}

		// Uncomment the following Lines of Code if you want to Force reCaptcha Validation

		// if( !isset( $_POST['g-recaptcha-response'] ) ) {
		// 	echo '{ "alert": "error", "message": "Captcha not Submitted! Please Try Again." }';
		// 	die;
		// }

		$mail-&gt;MsgHTML( $body );
		$sendEmail = $mail-&gt;Send();

		if( $sendEmail == true ):
			echo '{ "alert": "success", "message": "' . $message_success . '" }';
		else:
			echo '{ "alert": "error", "message": "Email **could not** be sent due to some Unexpected Error. Please Try Again later.&lt;br /&gt;&lt;br /&gt;**Reason:**&lt;br /&gt;' . $mail-&gt;ErrorInfo . '" }';
		endif;
	} else {
		echo '{ "alert": "error", "message": "Bot **Detected**.! Clean yourself Botster.!" }';
	}
} else {
	echo '{ "alert": "error", "message": "Please **Fill up** all the Fields and Try Again." }';
}

} else {
echo '{ "alert": "error", "message": "An unexpected error occured. Please Try Again later." }';
}

?>

LlinescttSep 28, 2018

index.html code


	
	
	ESCTT Inc. | Project MP: Software products for construction.
	
	
	
	

	
	
- 
	
- 
	
- 

	
	
- 
	

	
	
- 
	
- 
	

	
- 
	
- 
	
- 
	
- 
	
- 

	
- 

	
- 

	
	
- 

	

	
	ProjectMP | ESCTT Inc.

	

	

		[](#)

		

			

				About ESCTT Inc.

				
					
						719 Bloor St W, Suite 305

						Toronto, ON Canada

					

					

					Phone:[ +1 (866) 630-6950](tel:+18666306950)

					Email:[ info@esctt.com](mailto:info@esctt.com)
				

			

			

				Connect Socially

				[
					
					
				](https://www.facebook.com/ESCTTInc/)
				[
					
					

				
					
					
				](https://twitter.com/escomputer)

				[
					
					
				](https://www.linkedin.com/company/esctt-inc./)

			

		

	

	
	

		
		

			

				

					

					
					
						[
![attachment](images/blacklogo1.png)
](index.html)
						[
![attachment](images/logo2.png)
](index.html)
					

					
					

						
							
- [Home](#)
							
- [Software](#)
							
- [About](#)
							
- [Pricing](#)
							
- [Training](#)
							
- [Blog](#)
							
- [Contact](#)
						

						[](#)

					

				

			

		

		
		

				

					
							

								
									
											ProjectMP offers a suite of products to help manage your projects better.
									
								

							
					

					
						
					

					[](#)

				

			

				
				
					
					
						Our Software
						
All our software is integrated to ensure a complete and seamless project management tool.  Efficient, useful, simplicity. For more information, click on each of the individual products.

					
				
					

						
							
								
									
									
										
											
												
													
														[
															
![attachment](images/icons/riskmp.png)

														](#)
													
													
														RiskMP
														
Architects, PM's

													
												
											
										
										
											
												RiskMP is a tool to perform a risk assessment. It allows you to identify, manage, and track risk through the project.
												[
													For more
													information
												](https://riskmp.com/)

											
										
									
								
								

									
									
										
											
												
													
														[
															
![attachment](images/icons/superslist.png)

														](#)
													
													
														SupersList
														
Site Supers

													
												
											
										
										
											
												SupersList is a project tracking tool to record progress and changes easily via smartphone or laptop. Include photos and share updates between users in real time. Automatically generate change logs.
												[
													For more
													information
												](https://superslist.com/)
											
										
									
								
								

									
									
											
												
													
														
															[
																
![attachment](images/icons/changes.jpg)

															](#)
														
														
															ChangesMP
															
Project Managers

														
													
												
											
											
												
													ChangesMP helps you manage changes on-site, communicate those changes in real time, and update other project management tools such as MS Project.
													[
														For more
														information
													](https://changesmp.com/)
												
											
										
									
									

									
									
											
												
													
														
															[
																
![attachment](images/icons/addin.jpg)

															](#)
														
														
															ProjectAddIn
															
Project Mangers

														
													
												
											
											
												
													The ProjectAddin toolbar for MS Project allows you to view your MS Project plan online and quickly update the information. Choose to import updates and/or changes from site.
													[
														For more
														information
													](https://projectaddin.com/)
												
											
										
									
									

									
									
										
											
												
													
														[
															
![attachment](images/icons/closeout.jpg)

														](#)
													
													
														CloseOutPro
														
Deficiencies Team

													
												
											
										
										
											
												Record deficiencies and incompletes to create and update the punchlist. Assign the work and keep track of completions. Get through the closeout period, faster and easier.
												[
													For more
													information
												](#)
											
										
									
								

							
						
					
				
			

		
		

			

				

					

						A suite of construction products that help manage your project plans.

						

						

							
								
- [Real-time PM](#tabs-1)
								
- [Complete Solutions](#tabs-2)
								
- [Instant Communication](#tabs-3)
								
- [Go Mobile](#tabs-4)
							

						
						

						
ProjectMP is a suite of 5 software products for construction, that boost overall
							communication and productivity throughout the whole project process. From planning to closeout, ProjectMP software apps assist with every step of the project cycle, by ensuring that every member
							of the project stays well connected, and providing real-time communication, photos, and documentation (organization is included for free!).
						

					
					

		

				
				

						
							Pricing
							
 We offer an all-in-one price for ProjectMP; which includes all of our construction software.

						

						

							

								
									
										Monthly
									
									
										&dollar;19/mo
									
									
										
											
- **24/7** Access
											
- Mobile & Tablet Friendly
											
- Integration with MS Project
											
- **Unlimited** Projects
										
									
									
										[Sign Up](https://riskmp.com/register)
									
								

							

							

								
									
										Yearly
										Most Popular
									
									
										&dollar;129/yr
									
									
										
											
- **24/7** Access
											
- Mobile & Tablet Friendly
											
- Integration with MS Project
											
- **Unlimited** Projects
											
- 
											
											
											
											
										
									
									
										[Sign Up](https://riskmp.com/register)
									
								

							

							

								
									
										Enterprise
									
									
										Contact Us
									
									
										
											
- **24/7** Access
											
- Mobile & Tablet Friendly
											
- Integration with MS Project
											
- **Unlimited** Projects
										
									
									
										[Contact Us](#section-contact)
									
								

							

						

					

						

								
										Training
										
 Aside from our software, ESCTT Inc. also offers training courses which are accredited by many associations and recognized as industry standard.

									

								

									

										
											
												
![attachment](images/team/3.jpg)

												[
													
												](https://www.escomputertraining.com/courses/list/industry/9)
											
											
												ConstructionCourses
											
										

									

									

										
											
												
![attachment](images/team/2.jpg)

												[
													
												](https://www.escomputertraining.com/courses/list/industry/5)
											
											
												ArchitectsCourses
											
										

									

								
							
						
							For more information, click [Here](https://www.escomputertraining.com/)
						
					
							

						

					

						

							 

							

								
									
										
											
												
													
I'll be able to make use of this info right away. It was exciting to see how powerful this software is.

													
														P.C.
														Kingston, ON
													
												
											
											
												
													
Risk Management Software - This seems to be one of the most user friendly software packages.

													
														L.S.
														Edmonton, AB
													
												
											
											
												
													
Made things a lot clearer - will no longer be shy in trying this. Will certainly help me in my job and will set up new items to track - very helpful

													
														M.T.
														Toronto, ON
													
												
											
										
									
								

							

						

					

				
			

					
						

						Recently From the [Blog](https://constructiondiscussions.wordpress.com)

						 

							

								
									
										
											
												[
![attachment](images/blog/architect-businesswoman.jpg)
](https://constructiondiscussions.wordpress.com/2018/07/17/we-dont-communicate/)
											
										
										
											Construction Management
											
												[Constant Communicaion](https://constructiondiscussions.wordpress.com/2018/07/17/we-dont-communicate/)
											
											
												[Read more ](https://constructiondiscussions.wordpress.com/2018/07/17/we-dont-communicate/)
											
										
									
								

								
									
										
											
												[
![attachment](images/blog/architect-businesswoman.jpg)
](#)
											
										
										
											Construction Management
											
												[The Talk](https://constructiondiscussions.wordpress.com/2018/07/25/everyone-avoids-the-talk/)
											
											
												[Read more ](https://constructiondiscussions.wordpress.com/2018/07/25/everyone-avoids-the-talk/)
											
										
									
								

								
									
										
											
												[
![attachment](images/blog/architect-businesswoman.jpg)
](https://constructiondiscussions.wordpress.com/2018/07/17/we-dont-communicate/)
											
										
										
											Construction Management
											
												[It Isn't That Complicated](https://constructiondiscussions.wordpress.com/2017/04/25/it-isnt-that-complicated/)
											
											
												[Read more ](https://constructiondiscussions.wordpress.com/2017/04/25/it-isnt-that-complicated/)
											
										
									
								

								
									
										
											
												[
![attachment](images/blog/architect-businesswoman.jpg)
](#)
											
										
										
											Construction Management
											
												[Project Management](https://constructiondiscussions.wordpress.com/2017/04/20/project-management-and-documentation/)
											
											
												[Read more ](https://constructiondiscussions.wordpress.com/2017/04/20/project-management-and-documentation/)
											
										
									
								

							

						
					

				

				
					

					
						Contact Us
						

					

					

						

							

								

								

									

									
										
									
									
										
									

									

									
										
									

									
										
									

									

									
										
									

									
										Send Message
										

									

									

									
										
									

								
							

						

					

				

			

		
		
		

			
			

				

					
						
							
								
									Location:
									
										
											
719 Bloor St W. Suite 305

											Toronto, ON, M6G 1L5

										
									
								
							
						
						
							
								
									Contact:
									
										**Phone:**[ +1 (866) 630-6950](tel:+18666306950)

										**Email:**[ info@esctt.com](mailto:info@esctt.com)
									
								
							
						
						
							
							[
								
								
							](https://www.facebook.com/ESCTTInc/)

							[
								
								
							](https://twitter.com/escomputer)

							[
								
								
							](https://www.pinterest.ca/escttinc/)

							[
								
								
							](https://www.linkedin.com/company/esctt-inc./)
						
						
							2018 All Rights Reserved by ESCTT Inc.
						
					

				

			

		

	

	
	

	
	
	

	
	

	
	

	
	
LlinescttOct 2, 2018

I have solved it myself.

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