• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

Need assistance with CPANEL and hosted email forms

Here is the scenario.
User has a website www.somename.com hosted on a commercial webhosting facility.
They host their email locally at their office.
Recently, their DNS and web were migrated to a new server and since then, a form with code to send to one of their users is ending up in the local account email of their web service. Can someone work out why?
1 Solution
Brian GeeCommented:
It appears the MX record is not being pointed to your locally hosted server anymore thus is using the default catchall email of the Web hosting service.
OxygenITSolutionsAuthor Commented:
Agree but mail is routing correctly via the internet as their local mail is fine. Only the mail from the form is going to the wrong location. If I create a local mail database on the webserver using the built in mail on the CPANEL, the mail from the form goes to this address. Can I reset the DNS on the CPANEL webserver without it affecting the 'other' hosted DNS?
cPanel usually looks after the DNS management of a hosted domain, but perhaps you have nameservers outside of cPanel's control which send web traffic to your cPanel server without cPanel realising that it doesn't handle the email too.

Check what your MX servers should be (or rather, what they *are*, since everythgin works from everywhere else) and then compare those details with what you see in cPanel's "MX Entry" icon in the "Mail" box.  Select "Remote Mail Exchanger" and set the MX entries to be the same as you noted earlier.

If you don't see the "MX Entry" icon in the "Mail" box, see if you have the "Simple DNS Zone Editor" or "Advanced DNS Zone Editor" in the "Domains" box.

It sounds to me like cPanel thinks it should be handling your email locally.  If altering the MX records don't work, ask your webhost to move your domain's entry from /etc/localdomains to /etc/remotedomains
You should have set 0 priority in mx record to point to proper DNS.
Also in your form, instead of direct sending the mail from mail() function, use smtp authentication to send the mail which will ask you the smtp_host and smtp_port.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now