As far as I can tell, Google does not give me any interface into messages that were rejected other than 'spam'. I checked my spam folder, there is nothing there.
As I see it, the email server setup in Moodle is something like an email client. Except, Moodle is only for outbound.
I took a look at Sendgrid, but I am iffy about their new requirement to have two factor authentication. Moodle provides a method to login with a password, but I am not sure about having to get an message on my cellphone and enter that code.
I am also looking at Amazon SES. Frankly, I am unimpressed with their DKIM requirement. It takes up to three days to verify. If I get anything wrong, I suppose that will take another three days. There is a way around that, using an email address instead
of
domain name. To use the email address, I guess I am supposed to use their
"Amazon Resource Name (ARN)" in place of an email server in Moodle. This looks like something else I would have to fight with and try to muddle through. I may, reluctantly, go that route. But, I feel like I am halfway there with gmail, so I am not ready to give up on that just yet.
I reviewed my sendmail.php file. And it looks like I may have some of the parameters out of order. Oddly, this worked before an another website. I would think the only critical element would be to have the send-to-email in the right place.
Anyway, using this as my guide:
I rewrote the sendmail.php to more look like this:
$to="mydomain@gmail.com";
echo "to $to";
$subject=$_POST['subject'];
echo "subject $subject ";
$message=$_POST['message'];
echo "message $message";
$from=$_POST['email'];
echo "from $from";
mail($to, $subject, $message, $from);
I could not include the <br> or php tags, but you get the idea.
I I know the sendmail.php file is running.
I know all the parameters are correct.
I am pretty sure the parameters are correctly placed.
But I am still not getting the message in my gmail.com account.