DarkBy adlı üyeden alıntı:
mesajı görüntüle
DarkBy adlı üyeden alıntı:
mesajı görüntüle
try {
//Server settings
$mail->SMTPDebug = 0; //Enable verbose debug output
$mail->isSMTP(); //Send using SMTP
$mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = 'xxxxx'; //SMTP username
$mail->Password = 'xxxxx'; //SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
$mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
//Recipients
$mail->setFrom('xxxxx', 'Destek Talebi');
$mail->addAddress('xxxxx', 'xxxx'); //Add a recipient
//Content
$mail->isHTML(true);
$mail->CharSet = "UTF-8";
$mail->Subject = $mail_form_konu;
$mail->Body = $mail_icerik;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
die();
}