Jump to content

Sending email in godaddy?


ok

Recommended Posts

Hi guys

 

I have a website under godaddy.

 

Server: LINUX

Support: PHP 5

 

I tested sending email in godaddy using php, it worked for a few emails then after 5 times sending the email it stop sending.

 

Anybody can share there experienced under godaddy.

 

Can you guys show me a working codes or tutorial, or link for this matter.

 

 

Thanks in advance.

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/133859-sending-email-in-godaddy/
Share on other sites

<?php

 

require("class.phpmailer.php");

$mail = new PHPMailer();

$mail->IsSMTP(); // telling the class to use SMTP

$mail->SMTPAuth = false;

 

#$mail->Username = “sample+yahoo.com”;

#$mail->Password = “aspen”;

$mail->Host = "relay-hosting.secureserver.net"; // SMTP server

$mail->From = "[email protected]";

$mail->AddAddress("[email protected]");

 

$mail->Subject = "Email from thehightrailsway.com";

$mail->Body = "Simple baby.";

#$mail->Body =

"School:  " . $_POST['School'] .   

"\n\nContact Person:  " . $_POST['ContactPerson'] .   

"\n\nProgram Dates:  " . $_POST['ProgramDates'];   

 

$mail->WordWrap = 250;

 

if(!$mail->Send())

{

  echo "Message was not sent";

  echo "Mailer Error: " . $mail->ErrorInfo;

} else {

echo "<center><b>";

  echo "Message was sent, Loading...";

echo "</b></center>";

?>

 

<META http-equiv="refresh" content="5;URL=http://www.sample_website.com/ProgramFormThanks.html">

<?php

}

 

?>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.