SMTPDebug = 4; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username ='rajabuhamisi30@gmail.com'; // SMTP username $mail->Password = 'asha2003'; // SMTP password $mail->SMTPSecure = 'tls'; //$mail->SMTPSecure ='PHPMailer::ENCRYPTION_STARTTLS'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 25; // TCP port to connect to $mail->setFrom('rajabuhamisi30@gmail.com', 'baas associatives'); $mail->addAddress($_POST['mail']); // Add a recipient //$mail->addAddress('ellen@example.com'); // Name is optional $mail->addReplyTo('rajabuhamisi30@gmail.com'); //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'BAAS ASSOCIATES'; $mail->Body = '
welcome baas associates for better services