I would like a simple checkbox for removing the annoying - "send email everytime someone submits a form". Right now you can get "one million" emails if you have lot of users.

Keeping the email association is a good idea for the use crons and stuff. Right now I am commenting out the following field so that the mail wont be sent.

/* if ($survey->email) {
$subject = t('%survey submission', array('%survey' => $survey->title));
foreach ($responses as $key => $value) {
$body.= $key . " : ";
$body.= $value . "\n\n";
}
$body.= "-----\n";
$body.= t("Submitted by %name on %date\n", array('%name' => $user->name . ' ('.url('user/'.$user->uid, NULL, NULL, TRUE) .')', '%date' => format_date(time())));

$from = variable_get('site_mail', ini_get('sendmail_from'));
$headers = "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from";
user_mail($survey->email, $subject, $body, $headers);
} */

Keep up the good work.

Comments

bobthecow’s picture

if you take the email address out of the "Email address" field in the survey settings it won't email anyone...

walkah’s picture

Status: Active » Closed (works as designed)

yeah, this is by design. don't enter an email address if you don't want emails sent.