A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
Emails sent by the Contact Form 7 is sent but not arriving.
Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below.
Check your MTA logs.
Dec 4 11:43:32 grandvista postfix/pickup: 8000D61F8C: uid=33 from=<www-data>
Dec 4 11:43:32 grandvista postfix/cleanup: 8000D61F8C: email@example.com
Dec 4 11:43:32 grandvista postfix/qmgr: 8000D61F8C: from=www-data@localhost, size=844, nrcpt=1 (queue active)
I have this same problem but not sure how to fix it or even check MTA logs.
Do you have an MTA installed? The most common ones are exim, postfix, and sendmail, so we can check if there are any running processes with these names:
sudo ps wwaux | grep -E "(exim|postfix|sendmail)"
If that outputs any of exim, postfix, and sendmail, then you already have one installed. exim uses /var/log/exim_mainlog while sendmail and postfix use /var/log/mail.err. To check the error logs, run the following command:
sudo tail -40 path
That should output the last 40 lines of the file path (replace path with the actual path above).
Otherwise, you'll need to install one. I recommend installing Postfix:
sudo apt-get install postfix
After installing it, I suggest blocking external access to it as you're only going to be sending email from your droplet and not receiving email. Edit /etc/postfix/main.cf and set inet_interfaces to loopback-only:
inet_interfaces = loopback-only
and finally, restart postfix:
sudo service postfix restart
Thank you so much for responding. I did install postfix, checked the error log and got a few saying unqualified host name (znmedia2) and the latest saying Postfix mail system is not running.
The reason why I'm not able to follow any other tutorials to find the correct Postfix configuration is I have multiple sites on one droplet so I can't just enter in a single domain name.
you have to install postfix to make it work.