Install Sendmail
;Configure Sendmail
[sendmail]
smtp_server=<server>
smtp_port=<port>
auth_username=<authentication username OR sender_email@gmail.com >
auth_password=<authentication password OR sender_email_password>
Configure php.ini file
;SMTP = localhost;
;smtp_port = <port>;
;auth_username = ;
;auth_password = ;
;sendmail_from = me@example.com
sendmail_path = path\to\Ampps\sendmail\sendmail.exe
Test the Email
<?php
$from = "sender_email@gmail.com";
$to = "receiver_email@gmail.com";
$subject = "Hello Sendmail.";
$message = "This is an test email to test Sendmail.";
$headers = [ "From: $from" ];
mail( $to, $subject, $message, implode( '\r\n', $headers ) );