I'm probably not a common use case, however I've found your module helpful for my purposes. Users have to submit a report using our website, however they also need to be able to email a copy this report to people who are not in our system. The list of recipients can be upwards of 50 per submission and they've been known to submit the report several times in the same hour.

I didn't want to give all the submitter's administer print privileges so rather than just taking out the check completely I added an unlimited option to the hourly threshold drop down in mail_print.admin.inc (Line 137).

$form['settings']['print_mail_hourly_threshold'] = array(
    ....
    '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50)),
$form['settings']['print_mail_hourly_threshold'] = array(
    ....
    '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50,'Unlimited')),

And added an additional check to print_mail_form_validate in print_mail.inc (Line 238)

$print_mail_hourly_threshold = variable_get('print_mail_hourly_threshold', PRINT_MAIL_HOURLY_THRESHOLD);

  if ((!user_access('administer print')) && (!flood_is_allowed('print_mail', $print_mail_hourly_threshold - count($to_array) + 1))) {
$print_mail_hourly_threshold = variable_get('print_mail_hourly_threshold', PRINT_MAIL_HOURLY_THRESHOLD);

  if (((!user_access('administer print')) && (!flood_is_allowed('print_mail', $print_mail_hourly_threshold - count($to_array) + 1))) || ((!user_access('administer print') && $print_mail_hourly_threshold == 'Unlimited')) {

I don't know if it is something that you want to add into the main module, but I thought I'd share.

Comments

jcnventura’s picture

Status: Active » Needs review
jcnventura’s picture

Status: Needs review » Needs work

This should be a permission that can be granted to different roles, and not a setting in the flood control.

This way, you're opening the door for everyone (including anonymous) to send unlimited numbers of emails per hour. A permission could achieve the same objective with the added bonus of being easy to assign to different roles (even to anonymous, if that's what you really want).

jcnventura’s picture

Status: Needs work » Fixed

Just committed the new permission to dev.

Status: Fixed » Closed (fixed)

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