My team and I are willing to set an onion address for our website.

We can access the website and PHP is working well but we can't send emails through PHPMailer.

We use danwin1210 as host server with the following configuration in our php file :

<?php
  use PHPMailer\PHPMailer\PHPMailer;
  use PHPMailer\PHPMailer\Exception;
  require("tools/PHPMailer/src/PHPMailer.php");
  require("tools/PHPMailer/src/Exception.php");
  require("tools/PHPMailer/src/SMTP.php");

    if(!$error){
      try {
        $email = new PHPMailer;
        $email->isSMTP();
        $email->SMTPDebug = 2;
        $email->Host = 'danielas3rtn54uwmofdo3x2bsdifr47huasnmbgqzfrec5ubupvtpid.onion';
        $email->Port = 25;
        $email->SMTPAuth = true;
        $email->SMTPAutoTLS = false;
        $email->Username = "[email protected]";
        $email->Password = "XXXXXX";
        $email->CharSet = 'utf-8';
        $email->setFrom('[email protected]', 'XXXXXX');
        ...

Here is the error we get :

2019-11-18 15:16:38 SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Can someone tell us if this is correct ? Do we need to change something here or in our servers' config files ?

0

There are 0 answers