SMTP Code Problem

7 replies · opened Jun 29, 2021

FFergo20Jun 29, 2021

When I try to get my contact form to send it just loads forever and does not send. I know my hosting server's smtp works as Ive sent test emails through it so that shouldnt be the problem (Im using Cloudways if that matters.)

I have the code

$mail->IsSMTP();
$mail->Host = "mail.privateemail.com";
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->Port = 587;
$mail->Username = "fergus@insiteable.com";
$mail->Password = "*********";

typed in but it still does not send. Any help would be greatly appreciated.

SSemicolon WebSTAFFJun 30, 2021

Hello,

We have just checked out your Website and the Form Processor: https://insiteable.com/include/form.php is returning a 500 Internal Server Error which is an indication that this is a Server Configuration issue.

Firstly, please make sure that your PHP Version is more than 5.6 or preferably the Latest Version.

If you are still facing further issues, then please consider adding the .customjs Class to the .form-widget Element in the HTML File and then following code at the very top of your include/form.php File:
[ch_pre type="php"]error_reporting(E_ALL);[/ch_pre]

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. 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.

FFergo20Jun 30, 2021

Upon adding this code, the error code I get is insiteable.com is currently unable to handle this request. HTTP ERROR 500. Any advice on what may be the problem?

FFergo20Jun 30, 2021

Actually the error is

Warning: Undefined variable $mail in /home/620574.cloudwaysapps.com/nfupeaxybg/public_html/include/form.php on line 61

Fatal error: Uncaught Error: Call to a member function IsSMTP() on null in /home/620574.cloudwaysapps.com/nfupeaxybg/public_html/include/form.php:61 Stack trace: #0 {main} thrown in /home/620574.cloudwaysapps.com/nfupeaxybg/public_html/include/form.php on line 61

FFergo20Jun 30, 2021

I have solved the problem by adding

$mail = new PHPMailer();

to the code. I really think you should put that code above in your form support section as it seems to be necessary to make the $mail function worth.

Thank you so much for your help and continued support.

FFergo20Jun 30, 2021

My last problem I have is that the mail now will send but still on the page it just keeps loading instead of giving the typical we received your message response. Any idea why this is?

FFergo20Jun 30, 2021

Disregard that haha I finally got it to work. I had my debug set to 3 and I put it back to 0 and now everything works flawlessly. Sorry for spamming this ticket with questions but I have finally gotten it all to work.

Again, thank you so much for your help and continued support, Ill make sure to give 5 stars on themeforest!

SSemicolon WebSTAFFJun 30, 2021

Hello,

Thanks for your Patience! Very Glad that the issues were resolved.

Regarding the $mail = new PHPMailer(); Code in include/form.php File, the Default File that comes with the Package already have Inline Documentation on where to add the SMTP Codes:
[ch_pre type="php"]/-------------------------------------------------
PHPMailer Initialization
---------------------------------------------------
/

$mail = new PHPMailer();

/* Add your SMTP Codes after this Line */

// End of SMTP[/ch_pre]

Hope this Helps!

And Thank You so much for the Kind Words and considering to leave a Generous Review. We really Appreciate it and it will motivate us hard to provide you with more value with Canvas.

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

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