SMTPDebug = 2; // Enable debugging $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->SMTPAuth = true; $mail->Username = 'infoletlabo@gmail.com'; $mail->Password = 'Garfield@13'; $mail->SMTPSecure = 'tls'; // Enable SSL secure email $mail->Port = 587; // Port no may change //Recipients $mail->setFrom($email, $name); // User email $mail->addAddress('infoletlabo@gmail.com', 'Letlabo Nature Reserve'); // Your email $mail->addcc ($email); $mail->addReplyTo($email, $name); // Replay to User //Content $mail->isHTML(false); $mail->Subject = 'Accommodation Request'; $mail->Body = 'Equiry From: '.$name."\r\n".'Booking Dates: ' ."\r\n". 'Start Date: '.$arrive."\r\n".'End Date: '.$depart."\r\n".'Email: '.$email."\r\n".'Phone: '.$phone."\r\n".'Number of People:'.$people."\r\n".'Comments: : '.$message; if($mail->send()) { echo ""; } else { echo ""; } header('Location: accommodation.html'); exit; } ?>