Sumathraj
Sumathraj

Reputation: 31

PHP mailer issue Godaddy hosting

I have site i have created contact us page i want to send mail in users. i have makes the php mailer code but hen ever i submit the contact us button the issue is coming like this(SMTP Error: Could not connect to SMTP host.) please help what is i did wrong.

My PHP mailer code:

$mail = new PHPMailer;
  $mail->IsSMTP(); 
  $mail->SMTPDebug = 0;  
  $mail->SMTPAuth  = true; 
  $mail->SMTPSecure = 'ssl';
  $mail->Host     = "smtpout.secureserver.net";
  $mail->Port     = 465;
  $mail->SMTPAuth = true;
  $mail->Username = "what is the username";
  $mail->Password = "what is the password";
  $mail->setFrom('[email protected]', 'Raja');
  $mail->addAddress($email , $name);
  $mail->isHTML(true);
  $mail->send();

Upvotes: 0

Views: 107

Answers (1)

Synchro
Synchro

Reputation: 37710

  1. You're using GoDaddy
  2. You're using encryption, which GoDaddy doesn't support
  3. You're using authentication, which GoDaddy doesn't support
  4. You've disabled debug output so you have no feedback on what's going on, though you won't get much when using ssl mode to port 465 if the server doesn't support it
  5. You have no error checking, so you have no idea where it's breaking - base your code on the examples provided with PHPMailer.
  6. You're using an old version of PHPMailer; get the latest
  7. You've not read what the PHPMailer troubleshooting guide says about GoDaddy
  8. You didn't search before you posted

Upvotes: 1

Related Questions