isSMTP();
$mail->Host = 'smtp.gmail.com'; // Change this based on your email provider
$mail->SMTPAuth = true;
$mail->Username = 'sspappkeys@gmail.com'; // Your SMTP email
$mail->Password = 'momcjmfzwcfastuu'; // Your SMTP password (use App Passwords for security)
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;
// Recipients
$mail->setFrom('sspappkeys@gmail.com');
$mail->addAddress($recipient);
// Content
$mail->isHTML(true);
$mail->Subject = $subject;
$mail->Body = "Name: $name
email: $email
Message:
$message
"; $mail->send(); http_response_code(200); echo ''; } catch (Exception $e) { http_response_code(500); echo "Error: Could not send email. Mailer Error: {$mail->ErrorInfo}"; } } else { http_response_code(403); echo "There was a problem with your submission. Please try again."; } ?>