Hi,

If reroute email module is enabled, but the rerouting emailadress is empty (I selected "restore default button), emails are not being sent to original recipient, because in your code you do

$message['to'] = variable_get(REROUTE_EMAIL_ADDRESS, ini_get('sendmail_from'));

despite the fact that REROUTE_EMAIL_ADDRESS is empty.

It should not be necessary to enable/disable the module all the time.
All configuration should be done from within the configuration dialog. If the reroute field is empty I would expect the email to be sent to its original recipients.

Thanks,
Ulf

CommentFileSizeAuthor
#1 reroute_email.patch242 bytesceardach

Comments

ceardach’s picture

Title: emails via contact form can not be sent when reroute email module is enabled » Email rerouting should be disabled if no email address is configured
StatusFileSize
new242 bytes

I had this same problem and hacked the module (simplified patch attached). This allows me to disable rerouting by setting this in my $conf array in settings.php:

  $conf = array(
    'reroute_email_address' => '',
  );

In a distributed development environment, it'd also make it easy for each dev to set a different email address to reroute to.

kbahey’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.