Send email on PHP using XAMPP
P粉368878176
P粉368878176 2024-02-26 16:40:06
0
1
279

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.

P粉368878176
P粉368878176

reply all(1)
P粉299174094

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!