Mail Domain SMTP Tak Bisa Mengirim Email

  • Useful
  • 0
  • Unuseful

Saya mencoba membuat aplikasi pengiriman pesan menggunakan PHPMailer. Pengiriman berhasil ketika menggunakan host server niagahoster (srv75.niagahoster.com), tapi Request Timeout ketika menggunakan mail domain website saya sendiri (mail.ocebook.com).

Berikut kodenya:

$mail = new PHPMailer();

$mail->isSMTP();
$mail->Host = “mail.ocebook.com”;
//$mail->Host = “srv75.niagahoster.com”;
$mail->SMTPAuth = true;
$mail->SMTPSecure = “tls”;
$mail->Port = “465”;
//$mail->Port = “587”;

$mail->Username = “noreply@ocebook.com”;
$mail->Password = “dt2kw9zof”;

$mail->setFrom(“noreply@ocebook.com”,”OceBook”);
$mail->addAddress($to);
$mail->addReplyTo(“noreply@ocebook.com”);

$mail->isHTML(true); // kirim kode HTML
$mail->Subject = $subject;
$mail->Body = $message;

Saya maunya pesan yang terkirim juga ditambahkan pada Sent box dalam email domain yg saya punya. Kalo pakai host srv75.niagahoster.com pesannya terkirim ke email yg dituju, tapi gak muncul dalam email domain. Tolong dibantu?

Novice Asked on January 24, 2022 in Domain.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.