XAMPP - unable to send dummy emails
<p>I cannot get XAMPP to send a dummy email from PHP using mailtodisk.exe (in other words, to save the output to the disk instead of really sending the mail). Instead, no matter what I do, the mails keep being sent normally. I am trying to set it to not really send the mails but to generate their output, using the mailtodisk.exe utility that comes with XAMPP.</p>

<p>My php.ini settings seem correct to me (although I do not know whether the sendmail_path needs to be in escaped quotes as the commented sendmail.exe's path is - in any case, I tried both and neither worked):</p>

<pre><code>; sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"
</code></pre>

<p>phpinfo() also shows that the settings are correct:</p>

<p><a href="https://i.stack.imgur.com/jBKhw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jBKhw.png" alt="enter image description here"></a></p>

<p>I tried setting the "sendmail_path" variable directly from the source code using ini_set(), I tried altering the "php.ini-production" and "php.ini-development" files as well (although pointlessly if you ask me), I even deleted the whole sendmail.exe containing folder completely, I did restart Apache every time I changed a setting, and it's still sending normal mails. My system is running Windows 10, XAMPP version is 3.2.2 and php version is 5.6.14.</p>

<p>What am I missing here?</p>

<p><strong>EDIT:</strong> I neglected to mention that it used to work properly in the beginning, when I first installed XAMPP. Then at some point I needed to send an actual mail, so I changed the php.ini to use sendmail.exe, and I never managed to restore it ever since.</p>