SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output $mail->SMTPDebug = SMTP::DEBUG_SERVER; $mail->isSMTP(); $mail->Host = 'mail.tazz.com.au'; $mail->SMTPAuth = true; $mail->Username = 'itadmin@tazz.com.au'; $mail->Password = 'e]GG%LI,6$cx'; $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->Port = 465; $mail->CharSet = PHPMailer::CHARSET_UTF8; //It's important not to use the submitter's address as the from address as it's forgery, //which will cause your messages to fail SPF checks. //Use an address in your own domain as the from address, put the submitter's address in a reply-to $mail->setFrom('ben@tazz.com.au', (empty($name) ? 'Contact form' : $name)); $mail->addAddress('ben@tazz.com.au'); $mail->addReplyTo($email, $name); //Attachments //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name //Content $mail->isHTML(true); //Set email format to HTML $mail->Subject = 'Contact form: ' . $subject; $message = '
'; $message .= 'Name: ' . $name . '
'; $message .= 'Email Address: ' . $email . '
'; $message .= 'Mobile Number: ' . $mobile . '
'; $message .= 'Property Address: ' . $property_address . '
'; $message .= 'Enquiry:
' . $query . '
