tôi biết làm thế nào để sử dụng SMTP với PHPMailer:PHPMailer cấu hình mặc định SMTP
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "mail.yourdomain.com"; // sets the SMTP server
$mail->Username = "[email protected]"; // SMTP account username
$mail->Password = "yourpassword"; // SMTP account password
Và nó hoạt động tốt. Nhưng câu hỏi của tôi là:
Làm cách nào để cấu hình PHPMailer sử dụng các cài đặt này theo mặc định, để tôi không phải chỉ định chúng mỗi lần tôi muốn gửi thư?
Nếu nó là về wordpress kiểm tra -> wordpress \ wp-include \ class-phpmailer.php tập tin – swapnesh