I'm trying to send an email from no-reply@{domain} to my Gmail mailbox. I don't get any errors, just the emails don't arrive in my Gmail.
My PHP code looks like this:
<?php mail('[email protected]', 'Test Email', 'Hello World', 'From: John Doe <no-reply@{domain}>'); ?>
I have set up php.ini like this:
[mail function] SMTP=mail.{domain} smtp_port=25 sendmail_from=no-reply@{domain} mail.add_x_header=Off
In my domain's DNS settings, I have a MX @ 10 mail.{domain}
entry.
I don't know if this matters, but I already have hMailServer installed. Receiving emails is already available.
I think this is Google's own email protection. You can get more information about it here: https://support.google.com/mail/answer/81126?hl= zh