Drupal Contact Form and Google Apps Email

| Posted in
Drupal Contact Form and Google Apps Email

Here's the situation. I have a domain established that is set up with Google Apps. A particular email account created in GApps is working great, it can send and receive email fine. I'm using Drupal, one of the best content management systems, and its integrated contact form. For some reason when I associate this email address with the contact form, messages sent by the form are not received. So what's the problem?

I have searched all over the place for an answer to this problem and none have been sufficient. My MX Records are properly configured (how else would I be able to send and receive mail?), the message is not going into my junk mail folder, SMTP module didn't help (I shouldn't have to use a module to fix this problem anyway), and having my host update the SPF records did squat.

In desperation I contacted my web host (hostmonster.com) and the first tech I communicated with was not able to help at all. I submitted a ticket over the web explaining the problem and after some light dialogue my webhost quickly remedied the issue.

Here was how the conversation went:

Hostmonster: Since [domain name] mail is handled by Google, I recommend setting mail to be handled remotely to resolve the problem.

  • My question is, why was this setting not enabled in the first place? Obviously if my mx records are pointing somewhere else I don't want mail handled locally...whatever

After this change the contact form was successfully sending messages to my Google Apps email account. Unfortunately they were coming out in some really weird format. For hostmonster, email was being sent by the primary account username and the @domain.com portion was the mail server associated with the account. To fix this problem I had to add an email account under my web host that matched the email account name I was trying to send messages from.

After these changes mail was being sent successfully, but man did that take unnecessarily long to figure out.

Comments

I am under the same problem... also using HostMonster. did you have to change ANYTHING in your php.ini file?

I didn't have to change anything in my php.ini file.

Thank you for this tip. I was unable to send email from drupal using google apps until I tried this. I just added the username and info from the google apps side to my mail records on my host (I'm using bluehost) and it worked!

Thank you, thank you, thank you!!

I can not begin to tell you how much of a pain this had been for me! I edited php.ini files, edited the smtp files, everything! I can't believe it was this simple! You are a huge help to us all! I was about to drop hostmonster bc of this.

Thank you again for posting

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3> <blockquote> <img> <abbr> <span> <del> <ins> <small>
  • Lines and paragraphs break automatically.
  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options