Here is the working script for PHP Mailer in GoDaddy Hosting,
include("includes/class.phpmailer.php");
date_default_timezone_set('UTC');
define('SMTP_HOST','relay-hosting.secureserver.net');
define('SMTP_PORT',25);
define('SMTP_USERNAME','me@aravindnc.com');
define('SMTP_PASSWORD','me123');
define('SMTP_AUTH',false);
$email = 'aravind_n_c@yahoo.co.in';
$firstName = 'Aravind';
$mail = new PHPMailerR();
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->SMTPAuth = SMTP_AUTH; $mail->Host = SMTP_HOST;
$mail->Port = 25;
$mail->Username = SMTP_USERNAME;
$mail->Password = SMTP_PASSWORD;
$mail->SetFrom(SMTP_USERNAME,'AravindNC.IN');
$mail->AddReplyTo(SMTP_USERNAME,"AravindNC.IN");
$mail->Subject = "Welcome to AravindNC.IN";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$mail->MsgHTML('This is a test.');
$mail->AddAddress($email, 'Aravind NC');
$mail->Send();
date_default_timezone_set('UTC');
define('SMTP_HOST','relay-hosting.secureserver.net');
define('SMTP_PORT',25);
define('SMTP_USERNAME','me@aravindnc.com');
define('SMTP_PASSWORD','me123');
define('SMTP_AUTH',false);
$email = 'aravind_n_c@yahoo.co.in';
$firstName = 'Aravind';
$mail = new PHPMailerR();
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->SMTPAuth = SMTP_AUTH; $mail->Host = SMTP_HOST;
$mail->Port = 25;
$mail->Username = SMTP_USERNAME;
$mail->Password = SMTP_PASSWORD;
$mail->SetFrom(SMTP_USERNAME,'AravindNC.IN');
$mail->AddReplyTo(SMTP_USERNAME,"AravindNC.IN");
$mail->Subject = "Welcome to AravindNC.IN";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$mail->MsgHTML('This is a test.');
$mail->AddAddress($email, 'Aravind NC');
$mail->Send();
Share this if you got it working.
Tags : PHPMailer with GoDaddy SMTP email server Script working,
1 comment:
LOL
Post a Comment