Reputation: 31
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
Reputation: 37710
ssl
mode to port 465 if the server doesn't support itUpvotes: 1