Wordpress Not Sending Email

I have a Wordpress site that I recently air-lifted from Hosting to Cloud (Amazon Web Services). This is on a fresh LAMP stack and everything seems to be working with the exception of sending mail.

So, two things that make me think this is Server level:

1. "Forms -> Entries" show the entires submitted from the website but they haven't been forwarded to the correct email address.

2. "Settings -> General -> Email Address" did not send the confirmation email (changing the Administrative email).

Where are places I can check to make sure that mail (specifically I believe "sendmail") is working? The maillog (e.g. sudo tail -20 /var/log/maillog-20171119) doesn't show any mail in the queue.

Thanks for your help.
TessandoIT AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TessandoIT AdministratorAuthor Commented:
I've confirmed that sendmail is working:

sudo service sendmail status
sendmail (pid  2855) is running...
sm-client (pid  2864) is running...

Open in new window


But I cannot send a test using this command:

sudo echo "This is test mail body" | mail -s "Test Mail Subject" "user@email.com"
-bash: mail: command not found

Open in new window


In doing some initial research, I see folks with Wordpress referencing PhpMail. Is this what Wordpress uses by default?
0
Peter HartCommented:
if its a standard WordPress and all settings have been updated from when you airlifted to to its new home, you could try  this plugin
https://wordpress.org/plugins/check-email/

then it points to a server config problem
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Sending email with 100% deliverability is a bear.

Refer to my comments in https://www.experts-exchange.com/questions/29036679/AWS-EC2-mail-server.html if you think you really must delivery email from your server. Be prepared for weeks of work + likely months for you IP to develop enough reputation for minimal deliverability...

Or... You can be done a few minutes using MailGun...

Just setup a MailGun account + put in your credit card to enable all features + go through their verification tester to ensure all DNS records are correctly setup. First 10K messages/month are free.

Then install the WordPress MailGun plugin + send a test mail.

Normally this takes 5-10 minutes to setup + you'll have 100% deliverability.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

TessandoIT AdministratorAuthor Commented:
Thanks Gents!

So, the Check-Email plugin works (that chilternPC recommended). I can send a test mail from Wordpress to a test Gmail account & Hotmail account, but not to the domain I'd like to (for the company). Does this have to do with reputation?

And I'm with ya, David. I want to avoid having to setup a mail server. I think this doesn't make sense in this situation. Can you guys please give me a little clarity (or "altitude") around this?

Thanks again, I know your time is valuable.
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
You say... *I can send a test mail from Wordpress to a test Gmail account & Hotmail account* + just to be clear...

Sending + Delivering are two different things.

If you can send an email through whatever MTA + Relay setup you have + actually have your test message show up in a Gmail account, then likely your setup is working, as Google/Gmail delivery requirements are stringent...

The way I test this email credentials is using http://www.jetmore.org/john/code/swaks/.

I send through MailGun + verify the handoff from swaks to MailGun is working (so I've correctly setup the sending credential I'll be using).

Then I look at the MailGun logs (best logs of any relay service) + I can see the exact conversation between MailGun + external sites, like Gmail.

If there's a problem, the MailGun logged conversation makes any minor challenges easy to debug.

So about your *but not to the domain I'd like to* question.

The answer is, only your logs will tell you. These will be your relay service logs, if you're using a relay or your MTA logs, if you're using a native MTA.

Your logs hold the answer.
0
TessandoIT AdministratorAuthor Commented:
Yes, David. I was able to access the maillog and found the following for a successful send (meaning sent using the Plugin and received in my Gmail inbox) ->

Nov 22 17:06:17 ip-10-0-10-75 sendmail[20067]: vAMH6H3f020067: to=xxxx.tessando@gmail.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30564, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (vAMH6HlK020068 Message accepted for delivery)
Nov 22 17:06:17 ip-10-0-10-75 sendmail[20070]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Nov 22 17:06:18 ip-10-0-10-75 sendmail[20070]: vAMH6HlK020068: to=<xxxx.tessando@gmail.com>, ctladdr=<apache@ip-10-0-10-75> (48/48), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120689, relay=gmail-smtp-in.l.google.com. [173.194.205.27], dsn=2.0.0, stat=Sent (OK 1511370378 t69si1227820qka.111 - gsmtp)
Nov 22 17:09:15 ip-10-0-10-75 sendmail[20079]: vAMH9FIm020079: from=apache, size=559, class=0, nrcpts=1, msgid=<5ade8bdb8fe2665d8513a925aebddaf1@www.amareinc.com>, relay=apache@localhost

Open in new window


This is despite seeing the "verify=FAIL" on line 2 of the code above... ->

google-mail-received.png
Now on to an email that failed (meaning that the Wordpress UI said it was sent but it was never received), with a timeout from the domain:

Nov 22 17:16:06 ip-10-0-10-75 sendmail[20138]: vAMHG6VL020138: to=operations@dvice.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30565, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (vAMHG6Id020139 Message accepted for delivery)
Nov 22 17:18:06 ip-10-0-10-75 sendmail[20141]: vAMHG6Id020139: to=<operations@dvice.com>, ctladdr=<apache@ip-10-0-10-75> (48/48), delay=00:02:00, xdelay=00:02:00, mailer=esmtp, pri=120690, relay=amareadvice.com. [10.0.10.60], dsn=4.0.0, stat=Deferred: Connection timed out with amareadvice.com.

Open in new window


Now, I do see a pretty consistent "Authentication-Warning". Is this another clue?

Nov 22 17:20:01 ip-10-0-10-75 sendmail[20148]: vAMHK1ra020148: Authentication-Warning: ip-10-0-10-75: ec2-user set sender to root using -f

Open in new window


Thanks again, guys. We're getting close. :-)
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
All you've found so far is how to fix mail so it can leave your machine... by clearing the last message you see.

This does not mean your email will have any level of deliverability.

So to use your native MTA, clear the last message you see (you'll find how to do this by referring to EC2 docs... maybe...) + then you'll still have to go through all the items in my comments above... just to get started...

Or you can use MailGun + be finished in a few minutes...
0
arnoldCommented:
What is the return-path, envelope sender of the email you received?
If you use the same domain asthe sender as the recipient, they likely have rules to block their domain's use by others.
0
TessandoIT AdministratorAuthor Commented:
This has been fixed using SES. While it wasn't super clear at first, Integrating Amazon SES with Sendmail  was really the trick to getting this handled.

Per David's suggestion I did look at MailGun, but it wasn't an option for us as I have our Corporate domain tied to existing MX records and another third-party service has the possibility of complicating things. However, I can see how this is a very handy service for many situations.

Thanks everyone for your assistance today. You guys are awesome!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.