Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    5

    Angry Problem with mailform when dns/email is located externally

    The situation:
    We host a website for a client, clientname.com, but another company has the DNS and their e-mail accounts. No problem: The other company just sets their A-record to point to our webserver. Now we have set up a standard contact mailform on the clients website, using php's mail function to let the clients visitors send e-mails to the client.

    Problem: No e-mails ever arrive!
    Background for problem: The cPanel account is automatically created with MX record being clientname.com, when the MX record should really read mail.othercompany.com since they are the ones hosting the e-mail. So our webserver is in fact trying to send mail to itself, where there are no email accounts set up.

    Half-a-solution:
    I insert the correct MX record for clientname.com in our cPanel. But this leaves us with...:

    New problem: What if the other company that hosts the domain and the email decides to change the MX record? We would never know about it, and emails would get stopped again.

    So can anyone give me a suggestion for a more permanent solution to this problem? It would really make my day...
    Last edited by torkil; 09-12-2006 at 09:33 AM.

  2. #2
    ujr
    ujr is offline
    Member
    Join Date
    Mar 2004
    Posts
    294

    Default

    well, that is somewhat out of your control, however, you could test that the mailserver exists and that you can connect to it BEFORE you send your email. If it fails, just make it send you a an email stating that it's unreachable.

    Other than that, the MX handler would need to be changed for the domain if the mailserver changes.

  3. #3
    Member
    Join Date
    Sep 2006
    Posts
    5

    Default

    Thanks for your response!

    So you basically think my best option would be to try to convince the client to host his DNS with us, so we have control of the MX record?

    ... or is there a "disable MX-automation" or something like that in the account setups anywhere?

  4. #4
    ujr
    ujr is offline
    Member
    Join Date
    Mar 2004
    Posts
    294

    Default

    Ideally, for control, yes... but there may be other reasons why a client may want to point their MX records to some other server.

    Anyway, why must the email be sent through the remote SMTP server anyway? Couldn't your form simply use php mail?

  5. #5
    Member
    Join Date
    Sep 2006
    Posts
    5

    Default

    This happens with the php mailer too, I've spotted the problem in all the following applications:

    - Regular contact form, using php's mail() function
    - E-mails going out of our webbased CRM solution, using sendmail
    - E-mails going out of our customer's mailing list, probably using php's mail() function too

Similar Threads & Tags
Similar threads

  1. Turn off Exim and SA when hosting email externally?
    By meeven in forum E-mail Discussions
    Replies: 1
    Last Post: 10-28-2008, 04:45 AM
  2. PHP email - not able to send externally
    By zerokarma in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 10-16-2008, 02:48 PM
  3. Parked domains do not receive email externally
    By cytexone in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 07-31-2007, 11:14 AM
  4. Setting up email filtering for externally hosted domains?
    By meeven in forum E-mail Discussions
    Replies: 3
    Last Post: 07-20-2007, 08:23 AM
  5. externally (remotely) adding email addresses.
    By CaspianHost in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-28-2002, 01:02 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube