1

I have a site that was upgraded from D6 to D7 and is now hosted on Pantheon. I'm using the SMTP module and SendGrid for deliverability. The "require email verification when a visitor creates an account" setting is checked. When someone registers as a new user, the message saying that an email has been sent to their account is displayed on screen. However, neither watchdog nor Maillog shows any evidence that an email was sent, and no email is received.

Other emails, including password reset, Webform emails, Comment Notify, etc. all are sent and received as expected.

What could be causing the new user email not to be triggered?

2
  • If the emails that are coming through are all hitting local addresses (ex. @yourdomain) but the user registration emails to @arbitrary domain are not, then it could be a problem with your SMTP settings through sendgrid causing authentication issues.
    – schnippy
    Nov 16, 2014 at 6:14
  • I don't think that's it because 1) some of the emails coming through are to external addresses (like password reset, comment notify) and 2) if the email were being generated I should see something in maillog that the email was created, right? And the failure would be occurring after that point. So I feel like something is preventing Drupal from generating the email in the first place. Nov 16, 2014 at 17:00

2 Answers 2

1

I would create a clean Drupal site on Pantheon and configure just SendGrid. Do all emails get sent as expected from the new site? If so, it's likely that there is some custom code running on the problematic site calling hook_mail_alter or altering the normal mail handling in some other way.

You'll also find some great tips to help troubleshoot email issues in http://www.webomelette.com/drupal-modules-debug-emails

1
  • Thanks. I have done this successfully on another D7 Pantheon site with SendGrid, so the idea that there's some other code interfering makes sense. Could a module or code altering the login process have this effect? I'm guessing it's a problem with triggering the email rather than a mail handling issue. Plus, I can't think of any code that would be messing with mail. I'll check that out. In the meantime, I am using Rules to send out the new account emails, which works fine. Nov 19, 2014 at 21:42
0

If you have the profile2 module installed, it automatically disables sending of registration emails in profile2_form_before_user_register_submit_handler() and then re-enables them in profile2_form_after_user_register_submit_handler(). Depending on your settings, and other modules installed (logintoboggan in particular), the second function may never run, preventing email from being sent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.