By umpire
I have three Wordpress sites on this droplet. The first two send emails fine. The third one, which I have set up recently, will not send emails - not from contact us forms, nor from trying to change the admin email. The forms etc appear to work fine but no email ever shows up.
I am using Migadu. Sending emails manually from this domain is fine. So I don’t think it’s the DNS.
Nothing shows up in /var/log/mail.log. In fact this file has not been edited since 2018. Same for mail.log.1
I tried using WP Mail SMTP plugin and pointing it at Migadu SMTP. This doesn’t work, it says “There was a problem while sending the test email” when testing.
I never had this problem when I set up the second Virtual Host site. What could be causing this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @umpire,
You’ve been on the right track, the best way to make sure your e-mails will be received is using a plugin for SMTP, like in your case WP MAIL SMTP.
Yes, you mentioned you received the error “There was a problem while sending the test email” however this I believe is because of the port you’ve used to be set as closed. So, I believe you’ve either used port 465 or 587 to send the e-mails, correct? Either of these should be allowed for outgoing connections in order for you to be able to send out e-mails using Migadu.
You can allow either port with the following two commands
sudo iptables -A OUTPUT -p tcp --dport 465 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A INPUT -p tcp --sport 465 -m conntrack --ctstate ESTABLISHED -j ACCEPT
Or for port 587
sudo iptables -A OUTPUT -p tcp --dport 587 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A INPUT -p tcp --sport 587 -m conntrack --ctstate ESTABLISHED -j ACCEPT
Regards, KFSys
For solving problem follow this link https://www.wpbeginner.com/wp-tutorials/how-to-fix-wordpress-not-sending-email-issue/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.