Using MSMTP with PhpMailer on Windows

OpenĀ class.phpmailer.php and search for public $Sendmail = '/usr/sbin/sendmail';

Replace public $Sendmail = '/usr/sbin/sendmail';
With public $Sendmail = "PATH_TO_MSTMP_DIR/msmtp.exe --file=PATH_TO_MSTMP_DIR/msmtprc.ini -t";

Example with Uniserver:

Next, find this block and replace sendmail DIR: