1

I'm sending out an email using rules. I'm leaving the from field blank, so that it just uses the site-wide address.

For some reason it seems like Drupal is cutting characters off the from address. This is on my local dev machine so the email looks like this: [email protected]

When the email is supposed to get sent, I simply get a message saying "Unable to send e-mail. Contact the site administrator if the problem persists." so I checked my syslog, and all the from headers say "[email protected]" and the email can't send because my machine can't resolve that domain.

What the hell? Why has it modified the from address? I've tried changing the site email to "[email protected]" and when I do that nothing gets modified (IE I see [email protected] in my syslog). So why is it changing my website.meeples domain?

1 Answer 1

2

I tracked the problem down to the mimemail module.

In mimemail.inc there is a function called mimemail_headers which contains this:

  if (preg_match('/[a-z\d\-\.\+_]+@(?:[a-z\d\-]+\.)+[a-z\d]{2,4}/i', $from, $matches)) {
    $headers['Return-Path'] = "<$matches[0]>";
  }

The {2,4} at the end of the regex caused it to chop the les off of meeples. Changing it to + fixed the problem.

Your Answer

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

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