cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

PHPMailer codes won't send a message to an email

I have a project that needs to be done and our group life is on the line with this problem occurs to us. The problem is that it won't send a message to an email. In xampp localhost this phpmailer script works but after uploading to godaddy it happens to have some sort of problem. I tried various fix/solution with the forums I'd seen here in godaddy and still it won't work. For example like changing the host, port, smtp's auth and secure, and etc. Could somebody out there help me to find a fix for this even godaddy help support? I've been going at it for the past 2 weeks. Am I missing something? Do I have something to configure in cPanel? This is the script I made but it is just for a trial.

 

<?php

if(isset($_POST['register'])) {
try{
require ('phpmailer/PHPMailerAutoload.php');
$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'ssl';
$mail->Host = 'smtpout.secureserver.net';
$mail->Port = '465';
$mail->isHTML();
$mail->Username = 'msatwebsite@gmail.com';
$mail->Password = '***************';
$mail->SetFrom('no-reply@webmaster');
$mail->Subject ='MSU-MSAT Alumni Registration Confirmation';
$mail->Body = 'hello lagudas 3' ;
$mail->AddAddress('glysalagudas@gmail.com');
$mail->Send();
echo "Message Sent OK\n";
} catch (phpmailerException $e) {
echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
echo $e->getMessage();
}
}
?>

<!DOCTYPE html>
<html>
<head>

<meta charset="utf-8">

<title>Register - Alumni</title>

</head>
<body>

<section class="center-text">
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="POST" >
<input class="btn btn-primary" type="submit" name="register" value="Register">
</form>
</section>

</body>
</html>

 

It would be a lot of appreciate if someone out there helps me. You can contact me to my email as well in glysalagudas@gmail.com Hoping all of your kind consideration.

2 REPLIES 2
Solution

Re: PHPMailer codes won't send a message to an email

Highlighted
Rockstar I Rockstar I
Rockstar I
Solution

Re: PHPMailer codes won't send a message to an email

Hi @nuemeranjj16 ,

 

A while back I ran into a similar problem.  After several attempts of using the "normal settings" GoDaddy help said to try to put the name of the "relay server" in the settings.  That's what the support agent did and it worked.  GoDaddy support identified the server name for me because I couldn't find it.  I not completely sure how all of this works sometimes, but that was the solution in my  case.  The other setting that was scrutinized was the internal/external setting in cPanel for the email server.  

 

Not one of my better answers for sure, but hope this helps!

James

Not Just Pretty Sites, Pretty Doggone Smart Sites