I am stuck with this issue. I tried to search it, but no help. I have a very small application running on my local WAMP. I have tested my application on a WAMP server, and mailing service works perfectly. My WAMP has PHP 5.4, but when I deployed the same code on a hosting server(Network Solutions with PHP 5.3.27) it is not working. Below is my code:
<?php
require 'PHPMailerAutoload.php';
/*
other code;
*/
//Mailing settings
$mail = new PHPMailer;
$mail->isSMTP();
$mail->Host = 'smtp.server_name.net';
$mail->SMTPAuth = true;
$mail->Username = ' admin_user_name@server_name.net';
$mail->Password = 'password';
$mail->SMTPDebug = 1;
$mail->From = 'from_address@server_name.net';
$mail->FromName = 'from_name';
$mail->addAddress('receiver_add@abc.com', 'Receiver');
$mail->addCC('cc_address@abc.com','XYZ');
$mail->WordWrap = 50;
$mail->Subject = 'Subject_Was_Not_Long';
$body=" ABCD BODY.\n";
$mail->Body = $body;
if(!$mail->send()) {
header('Location: Same_File.php?registered=false');
} else {
header('Location: Same_File.php?registered=true');
}
?>
I am not sure what I have to do, because I am not able to access the PHP config as well. Please help!
Extra bit of info: Configuration Hosting Server My PC System Linux Windows Server API CGI/Fast CGI Apache Handler 2.0 Virtual Directory Support Disabled Enabled Thread Saftey Disabled Enabled
Thank You...