How can I send emails with a PHP script from a Bitnami server Debian 10 on Google cloud?

161 Views Asked by At

I have a brand new small website hosted on a VM instance on Google cloud that makes use of a Bitmami LAMP stack running on Debian 10. I don't use WordPress, just regular HTML, but I cannot send any emails out.

I also have a similar website on shared hosting with Godaddy where an email form and its PHP script send emails just fine.

The website promotes the services of many small businesses. When visitors get interested in what my customers offer, they fill out an HTML form powered with a PHP script, and an email is sent to the right person regardless of their email service provider.

I've already installed Sendmail on Debian and edited the php.in file so that PHP's mail() function is finally returning TRUE, but emails are still not coming out. I checked Sendmail's queue, and found that all test emails are being stored. All targeted email addresses used for testing belong to me. One on gmail, one on hotmail and one on a custom domain hosted on Siteground.

I don't need to receive emails. I only need to send emails of interested visitors to my customers.

My needs are simple, so I don't need to use a third-party service to send emails, but I'm stuck, and I don't know what to do next to achieve my goal.

I will appreciate any help. Thank you for reading.

0

There are 0 best solutions below