[development] Mail Problem on Drupal 7
andrex at alumni.utexas.net
Mon Aug 29 19:04:54 UTC 2011
> I have a problem with contact form in Drupal 7, when I try to send a contact
> information through this, the site informs that the message was sent, but
> the mails doesn't come. In the same server I have other site with Drupal 6
> and this site works perfectly, so I deduce that the problem is not on the
> mail server configuration.
I recently had this exact problem. Here's what the problem turned out to be:
* The site was at www.example.com.
* Mail service for example.com was hosted at a different provider than web hosting.
* Emails sent to anyone at example.com disappeared, as you reported.
The trouble was that mail to anyone at example.com was being sent to the web host's mail server. I
think this was caused by cPanel. By default, cPanel assumes that the mail service must be hosted on
the web host's mail servers. So it routed the messages there. They sat there undeliverable for
several days, and were finally sent back as undeliverable.
The solution was to change the MX records for example.com, as seen in cPanel at the web host. These
aren't the real, public MX records; but they are what the web host consults when it's deciding where
to send the mail to. In cPanel I changed the MX entries to "Remote server" and entered the real MX
records. After that, mail delivery worked again.
If you want to test this, change the recipient email addresses in the contact form to some addresses
outside of your web site's domain, and try the contact form again. If it works, then the problem is
what I described above.
More information about the development