How to use cloudflare with PHP sendmail?

When I was using XAMPP before, the PHP mail() function worked as a charm, after migrating to Windows IIS I downloaded a copy of the sendmail package that XAMPP uses under the Inetpub folder.

With everything configured correctly, I can’t seem to get the mail function to send emails.

I’ve setup a test mail file mail.php under the domain to check if it’s working.

I used gmail’s SMTP server at first since that’s what worked before. And I did get the mail() function to work at the beginning, but now, it’s not working at all. I’ve tried to change port, verified the password, but no luck.

Now after configuring email with Cloudflare, I can receive email from [email protected], but how do I use this address to send from?

You need a mail server to send email from, and that’s not something Cloudflare provides. Gmail ought to work if you use the right port and password and so forth. You can also set up Sendgrid, which works great with the PHP/Wordpress mail() thing, and is free for low volume.

I’m not sure how you’re receiving email, either; your domain has an MX record but it doesn’t lead anywhere valid. Basically, you need an email provider, which Cloudflare is not.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.