Contact form producing Error 500 on Godaddy

5 replies · opened Oct 17, 2018

HhowardreithOct 17, 2018

Hello! Thank you for your fantastic template! I hope you can help me figure this out.

My site http://www.ereaton.com is hosted on Godaddy and I've been getting an Error 500 when attempting to submit the contact form (which is at http://www.ereaton.com/contact.html.

I learned through googling, this forum, and the docs that I needed to configure it for SMTP. I've added the following to sendemail.php.

$mail->IsSMTP();
$mail->Host = "mail.ereaton.com";
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->Port = 25;
$mail->Username = "ed_eaton@ereaton.com";
$mail->Password = "(password)";

Do you have any thoughts what could be causing the error and how to fix it?

Thank you!

SSemicolon WebSTAFFOct 17, 2018

Hello,

Apparently, GoDaddy blocks the default SMTP ports, as reported by some users. Please make sure that you have Edited the Codes according to the SMTP Configuration of Godaddy Servers: https://uk.godaddy.com/help/what-do-i-do-if-i-have-trouble-connecting-to-my-email-account-319. So change the $mail->Port = 25; to $mail->Port = 465; should work fine. You can also consider contacting their Support regarding this issue.

Hope this Helps!

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

HhowardreithOct 17, 2018

Thank you for the prompt reply!

I changed the port to 465. Unfortunately that doesn't seem to have solved the problem.

I've attached the file here with the password removed. Perhaps there is something else I've missed or messed up?

Thank you again for your help.

HhowardreithOct 17, 2018

Apparently I could not upload that file for security reasons. Here's what the top of the file looks like.

<?php

require_once('phpmailer/PHPMailerAutoload.php');

$toemails = array();

$toemails[] = array(
'email' => 'ed_eaton@ereaton.com', // Your Email Address
'name' => 'Edward R. Eaton' // Your Name
);

// Form Processing Messages
$message_success = 'I have successfully received your message and will get back to you as soon as possible.';

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

$mail = new PHPMailer();

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

$mail->IsSMTP();
$mail->Host = "mail.ereaton.com";
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->Port = 465;
$mail->Username = "ed_eaton@ereaton.com";
$mail->Password = "password";

SSemicolon WebSTAFFOct 21, 2018

Hello,

Please use the Latest Version of the include/sendemail.php File as the code was updated to fix this issue. Please find the following code:

require_once(‘phpmailer/PHPMailerAutoload.php’);

and replace it with:

use PHPMailer\PHPMailer\PHPMailer;

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

This should definitely fix the issue. Hope this Helps!

Please make sure that the Files are promptly updated after an Update has been released to avoid any unexpected issues.

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

HhowardreithOct 22, 2018

Thanks SemiColonWeb. Your update seems to have fixed it.

Note for future readers - I needed to remove the SMTP elements of my code for it to work correctly.

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