Need assistance with CPANEL and hosted email forms

Posted on 2011-04-22
Last Modified: 2013-11-19
Here is the scenario.
User has a website 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?
Question by:OxygenITSolutions
    LVL 23

    Expert Comment

    by:Brian Gee
    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.
    LVL 7

    Author Comment

    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?
    LVL 11

    Accepted Solution

    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
    LVL 8

    Expert Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now