It is not always that it is only one email address that should get all redirects.
The change to accommodate this is very simple.
Would you consider changing ...
- in advanced_mail_reroute.module $form['main_settings']['primary_email'] change from textfield to textarea
- new code for validation:
function advanced_mail_reroute_settings_form_validate($form_id, $form_values) {
foreach(explode(',', $form_values['values']['main_settings']['primary_email']) as $email) {
if (!valid_email_address(trim($email))) {
form_set_error('main_settings][primary_email', t('Invalid %e email entered for primary email', array('%e' => $email)));
}
}
$new_rule = $form_values['values']['new_rule'];
if (!empty($new_rule['mailkey']) && $new_rule['rule'] == ADVANCED_MAIL_REROUTE_REROUTE && !empty($new_rule['email'])) {
foreach(explode(',', $new_rule['email']) as $email) {
if (!valid_email_address(trim($email))) {
form_set_error('new_rule][email', t('Invalid %e email entered for primary email', array('%e' => $email)));
}
}
}
}
---------------------------------------------------
same can be done for Rule's Email field.
thanks for your consideration.