I'm trying to create a particular contact form and send all the information using PHPMailer.
I want to test every single part before deploing the form, so I was setting up Xampp for linux following this answer
Use of mailtodisk / mailoutput in XAMPP for Linux
and setting my sendmail.php file with placeholders
$smtpHost = 'localhost';
$smtpUsername = 'hello@example.com';
$smtpPassword = 'PASSWORD';
But it looks like I'm missing some points, if I try to send a mail with this configuration I get
Failed to connect to server: php_network_getaddresses:
So I tried with the smtpHost of my server and a real username (only the password was fake), and I get the error login message, so I'm really trying to connect to my server, when I tought that it wasn't possible because I never configured Xampp to do that.
How can I set up Xampp to not send email to external server but only on localhost and write the email in the mailoutput folder?
I even tried with Xampp (3.2.2) for windows because I have read that is alredy set to write mail on the mailoutput folder.
I followed the configuration steps for the php.ini file and for sendmail.ini file. But in the end I had to start mercury to send the mail, now I see the client output of PHPMailer, but even with that the email is not in the mailoutput folder.
So, on Linux I have to install something like mercury to be able to at least debug with client side messages? I'm really confused on what to do next.