I have setup the php.ini and sendmail.ini with smtp.gmail.com with my gmail ID and password with my xampp folder on local computer.
The message is successfully sent and is available in sent items but its not received by the recipient which is another gmail account.
can anyone please guide that how can the message sent through mercury gmail SMTP settings, be received by the other gmail recipient.
php.ini
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = abcXXXX@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
sendmail.ini
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=abcXXXX@gmail.com
auth_password=My-Gmail-Password
force_sender=abcXXXX@gmail.com(optional)
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
/*
Tested working with PHP5.4 and above (including PHP 7 )
*/
require_once './vendor/autoload.php';
use FormGuide\Handlx\FormHandler;
$pp = new FormHandler();
$validator = $pp->getValidator();
$validator->fields(['name','email'])->areRequired()->maxLength(50);
$validator->field('email')->isEmail();
$validator->field('message')->maxLength(6000);
$pp->sendEmailTo('maht.pk@gmail.com'); // ← Your email here
echo $pp->process($_POST);