Joomla SMTP e-mail failing

leccyblue

Member
Mar 18, 2021
6
1
3
UK
cPanel Access Level
Website Owner
Hi All,
I am using Joomla on a cPanel server hosted by Heart Internet, so I only have access to cPanel and nothing more. We don't use cPanel for e-mail. When I put our 3rd party mail host SMTP server details in Joomla, and send a test e-mail - it fails. The error is " SMTP connect failed " and " Test mail could not be sent ". I have reported this to Heart Internet however I'm banging my head against a brick wall. They don't appear to know what they are doing, saying it's an issue with my mail host and did I want them to change my DNS records to point to them for e-mail! The mail host I use requires us to whitelist any IPs that will be used to deliver mail, and I had whitelisted my cPanel shared server IP with them. To rule out my mail host, I have also set up an account with mailtrap.io - and I see exactly the same problem with the same errors.

I suspect that Heart likely block all SMTP traffic to external IPs, allowing only their own (which we don't use) but they say not?

I was wondering if anyone here had any ideas as to what might be causing this, so I can point them in the right direction?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,915
608
273
cPanel Access Level
Root Administrator
Hey there! One test you could perform, if your cPanel server has shell access, would be to try and manually connect to that external resource with telnet. You would just run this command to test the connection:

Code:
telnet x.x.x.x ##
where "x.x.x.x" is the remote IP address or domain name of your SMTP server, and "##" is the port number of the connection, which is usually 25 or 587 or something like that.

Can you try that to see if that gets you more details? If that fails directly with telnet, something is blocking the connection on the server or the provider's network.
 

leccyblue

Member
Mar 18, 2021
6
1
3
UK
cPanel Access Level
Website Owner
Ahh, never even thought about shell access. I've SSH'd in however it says shell access is disabled and if we want it to contact support. I'll put in a request, thanks for this direction - a great suggestion!
 

leccyblue

Member
Mar 18, 2021
6
1
3
UK
cPanel Access Level
Website Owner
I have SSH access now but unfortunately telnet isn't installed! And I have no admin rights on the server to install it. If I try to ping the mail host it tells me icmp open socket: operation not permitted. So if they are blocking ICMP I suspect they are also blocking SMTP
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,915
608
273
cPanel Access Level
Root Administrator
Many servers block ICMP, so that in itself doesn't worry me too much, but it seems the tools are limited on that system for additional troubleshooting. For more details it would be best to speak with the hosting provider directly to see if they have additional limits on the SMTP service.
 

leccyblue

Member
Mar 18, 2021
6
1
3
UK
cPanel Access Level
Website Owner
Thanks cPRex, I appreciate your response. I've been in contact with Heart Internet about this issue since Wednesday, and I'm pulling my hair out, I don't think they have the technical skills to even understand what I am saying. They've tried to fob me off with all sorts of solutions including changing my DNS records to point mail at them (??!!), blaming Joomla, blaming my mail host, saying I need to enable "access for less secure apps" which from my research appears to be a GMail setting - we don't use Gmail!

I am able to get e-mail to work in Joomla using Sendmail however clearly that then routes the message via their own mail flow infrastructure and the emails land in spam because they don't pass the SPF test. I don't really want to include their SMTP servers in our SPF because clearly they are shared by all of their customers and there's nothing to stop anyone spinning up a hosting account with them and start sending mails purporting to be from our domain.

I've made the mistake of telling them Sendmail works and now they are trying to close the ticket saying "if sendmail works then this proves that we're not blocking communications between your server and your smtp host", even though I'd already told them that the mails then arrive from their SMTP servers (n1nlsmtp01/02/03.shr.prod.ams1.secureserver.net in my testing) and not directly from my shared cPanel server.

I want to go live with this site next week but can't until I have SMTP working!
 

leccyblue

Member
Mar 18, 2021
6
1
3
UK
cPanel Access Level
Website Owner
I'm sorry they aren't being more helpful! It does seem that there is something outside of your immediate configuration that is resulting in this behavior though.
Thank you. Yeah, absolutely, I've spun up a brand new Joomla instance and it does exactly the same. I think quite simply they have disabled outbound SMTP from their cPanel servers. Quite rightly really, given how easy it would be for someone to spin up an account with them and start sending out mass mail. But you'd think they'd have knowledge of this, be able to understand what is a relatively basic technical question, and have the ability to create a rule to allow SMTP outbound to specified hosts.

What an absolute shambles!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,915
608
273
cPanel Access Level
Root Administrator
For sure - we have an article here with known providers that make this change:


so it's pretty common in the industry, but I'd expect the support team to know that if that is the case.
 

leccyblue

Member
Mar 18, 2021
6
1
3
UK
cPanel Access Level
Website Owner
For sure - we have an article here with known providers that make this change:


so it's pretty common in the industry, but I'd expect the support team to know that if that is the case.
Thanks Rex, that is very useful. I am going to forward this to them!

My latest reply from their technical support...

"Thanks for your reply,

It seems that trying to connect to an external service won't be permitted regarding the mail service, you would need to create a mailbox on cPanel, then authenticate to the mailbox directly in order to send the emails out. If you can set up Joomla to connect to the mailbox on your cPanel account and test, it should function for you. "

I'm going to go and bash my head on a brick wall for a bit I think
 
  • Like
Reactions: cPRex
Apr 15, 2021
6
0
1
Australia
cPanel Access Level
Website Owner
Hi Leccyblue,

Have you sorted this out? I have the same issue on CPanel Shared Host. We don't use CPanel email, we use 365office email. Email not working if sender email is same as site's domain. WORKED for the rest.
It's been days looking up for solution still no luck.

Thanks,
Tangent
 
Apr 15, 2021
6
0
1
Australia
cPanel Access Level
Website Owner
@cPRex yes double checked "Remote" is already ticked. What else can be done to make it work?

Our website is based Joomla. I used Send Test Mail under Global Configuration > Server > Mail Settings,
1. selected Mailer > PHP Mail
=> Failed if From email is [email protected]
=> Success if From email is [email protected]

2. selected Mailer > SMTP
=> Failed could not connect via SMTP

3. selected Mailer > Sendmail
=> Failed
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,915
608
273
cPanel Access Level
Root Administrator
Thanks for doing that test, and I think "Joomly" was a pretty great typo on my part :D

If the mail isn't working through a mail client either that would indicate the problem isn't in Joomla but with the mail in general. I'd recommend checking the ports on the mail server to ensure they are open. What error did you get in the mail client when trying to send a message?