Update mailtest.php for ISSO3
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 1 Jul 2008 14:15:41 +0000 (10:15 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 1 Jul 2008 14:15:41 +0000 (10:15 -0400)
docs/mailtest.php
docs/systemglob.php

index 8b28eb066db1275288ce983a38888d06120b3e86..9fdf4b6c79d289a0607740e01e9cb61791fb7668 100644 (file)
@@ -26,7 +26,7 @@ if (!file_exists('./global.php'))
 {
        chdir('../');
 }
-require_once('./global.php');
+require_once './global.php';
 
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -45,7 +45,7 @@ require_once('./global.php');
 
 <?php
 
-if (empty($bugsys->in['__submit__']))
+if (empty($input->in['__submit__']))
 {
 ?>
 
@@ -70,10 +70,12 @@ Mail Test: " . '$Revision$' . "
 Sendmail (From): \"" . ini_get('sendmail_from') . "\"
 Sendmail (Path): \"" . ini_get('sendmail_path') . "\""; 
        
+       require_once ISSO . '/Mail.php';
+       $mail = new BSMail();
        $mail->setFromName('Bugdar Mailing Test');
        $mail->setSubject('Email Tests');
        
-       if (empty($bugsys->in['receive']) OR empty($bugsys->in['sender']) OR !BSFunctions::is_valid_email($bugsys->in['receive']) OR !BSFunctions::is_valid_email($bugsys->in['sender']))
+       if (empty($input->in['receive']) OR empty($input->in['sender']) OR !BSFunctions::is_valid_email($input->in['receive']) OR !BSFunctions::is_valid_email($input->in['sender']))
        {
                echo '<p style="color: red">You did not fill in all the fields or the email addresses are not valid. Please <a href="mailtest.php">go back</a>.</p>';
        }
@@ -81,27 +83,28 @@ Sendmail (Path): \"" . ini_get('sendmail_path') . "\"";
        {
                // normal Bugdar mailing
                $mail->setBodyText(sprintf($text, 1, 'sending with the Bugdar-configured address'));
-               $mail->send($bugsys->in['receive']);
+               $mail->setFromAddress(bugdar::$options['webmasteremail']);
+               $mail->send($input->in['receive']);
        
                // mail from the alternate address
                $mail->setBodyText(sprintf($text, 2, 'sending from the address you specified that exists on the mail server'));
-               $mail->setFromAddress($bugsys->in['sender']);
-               $mail->send($bugsys->in['receive']);
+               $mail->setFromAddress($input->in['sender']);
+               $mail->send($input->in['receive']);
        
                // mail from self
                $mail->setBodyText(sprintf($text, 3, 'sending from the receiving address'));
-               $mail->setFromAddress($bugsys->in['receive']);
-               $mail->send($bugsys->in['receive']);
+               $mail->setFromAddress($input->in['receive']);
+               $mail->send($input->in['receive']);
        
                // mail from non-existent
                $mail->setBodyText(sprintf($text, 4, 'sending from a non-existent address'));
-               $mail->setFromAddress(preg_replace('#(.*)@(.*)#', 'bugdar-mail-test@\2', $bugsys->in['receive']));
-               $mail->send($bugsys->in['receive']);
+               $mail->setFromAddress(preg_replace('#(.*)@(.*)#', 'bugdar-mail-test@\2', $input->in['receive']));
+               $mail->send($input->in['receive']);
        
 ?>
 
        <h2>Complete</h2>
-       <p>All the test emails were sent to <em><?= $bugsys->in['receive'] ?></em>. Please check that you received all 4 tests.</p>
+       <p>All the test emails were sent to <em><?= $input->in['receive'] ?></em>. Please check that you received all 4 tests.</p>
        
 <?php
        }
index b84c4a1c58b14c5e0e9ed305c1cb8bbac0d483b2..efcfdb20bbbcdcad1ae4ba307c37f619ed1d95ca 100644 (file)
@@ -5,7 +5,7 @@ require_once('./global.php');
 
 echo '<pre>';
 
-print_r($bugsys);
+print_r(get_class_vars('bugdar'));
 
 echo '</pre>';