Example #1
0
                 // if we can't send the email, then don't write the
                 // new password in the db
                 $ets->page_body = $l['log-forgot-failed'];
                 break;
             } else {
                 // email was sent, set the password to something new
                 $client->set('password', $hash);
                 $client->updateDB();
                 $ets->page_body = $l['log-forgot-success'];
             }
         }
     }
 }
 if (empty($_POST) || !empty($err)) {
     if (!empty($err)) {
         $ets->page_body = input_error_box($err);
     }
     // build input
     $form->action = script_path . 'login.php?action=forgot';
     $form->method = 'post';
     $form->class = 'nlb_form';
     $form->name = 'new_entry';
     $table->class = 'nlb_table';
     $table->width = "100%";
     // USERNAME
     $i = 0;
     $f[$i]->type = 'text';
     $f[$i]->name = 'username';
     $f[$i]->desc = $l['username:'];
     // SUBJECT
     $i++;
Example #2
0
             $mail->addAddress($row['email'], $row['username']);
             $mail->Body = str_replace('%USER%', $row['username'], $message);
             if (!$mail->Send()) {
                 echo 'ERROR:<HR>';
                 echo $mail->Body;
                 exit;
             }
             $mail->ClearAddresses();
         }
         $mail->SMTPClose();
         // must call this when we use SMTPKeepAlive
         $ets->page_body = $l['acp-mail-success'] . $number_sent;
     }
 } else {
     if ($baddata) {
         $ets->page_body = input_error_box(array($l['all-fields-required']));
     }
     $ets->page_body .= $l['acp-mail-intro'];
     // build form
     $form->action = 'admincp.php?action=mass_mail';
     $form->method = 'post';
     $form->class = 'nlb_form';
     $table->class = 'nlb_table';
     $table->width = "100%";
     $f = array();
     $i = 0;
     $f[$i]->desc = $l['acp-mail-subject'];
     $f[$i]->type = 'text';
     $f[$i]->name = 'subject';
     $f[$i]->value = $config->get('site_name');
     $i++;