By scottscp911
I’m setting up “sendmail” to send emails from my wordpress sites. I want to be able to use PHP mailer. I have tried every tutorial on the net to find and fix the problem. I keep getting “Connection refused by [127.0.0.1]” every time I test it. I have tried disabling the firewall and still did not work.
Tutorials that I tried but did not work: https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx https://www.digitalocean.com/community/questions/configure-ubuntu-16-04-with-lemp-to-send-emails-for-multiple-websites https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-14-04
Rest of the tutorials or questions do not have answers at all.
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 @scottscp911,
Sendmail passes messages submitted by “send via command line sendmail” to local sendmail daemon listening at 127.0.0.1:25. It seems like you haven’t configured it that way. Please try and use the following
To fix, set DAEMON_OPTIONS in your sendmail.mc file. Add listening on 127.0.0.1 or use listening on IPv4 “any”.
In your sendmail.mc add the second DAEMON_OPTIONS listed below. Recompile sendmail.mc into sendmail.cf and restart (or HUP) sendmail daemon.
DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=MTA-loopback')dnl
Regards, KDSys
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.