Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Using Gmail in php mail() function
first of all thanks for your great tutorials!
However, with this one (https://www.digitalocean.com/community/tutorials/how-to-use-gmail-or-yahoo-with-php-mail-function) I encounter an issue I could not solve so far.
If I do:
cat sample_email.txt | msmtp –debug -a gmail email@example.com
There is a lot of console output, ending with:
reading recipients from the command line
If I wait long enough (approx. 2 minutes) I receive the mail. However, the problem propagates to phps mail function. This means, if a user fills out a contact form he has to wait for approx. 2 minutes until he receives feedback.
(When googling, I usually find that the /etc/hosts file needs to be properly set, however, this is not the issue here).