From 74050573161b88cc99c637230a73631587f62431 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 1 Jul 2008 10:15:41 -0400 Subject: [PATCH] Update mailtest.php for ISSO3 --- docs/mailtest.php | 25 ++++++++++++++----------- docs/systemglob.php | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/mailtest.php b/docs/mailtest.php index 8b28eb0..9fdf4b6 100644 --- a/docs/mailtest.php +++ b/docs/mailtest.php @@ -26,7 +26,7 @@ if (!file_exists('./global.php')) { chdir('../'); } -require_once('./global.php'); +require_once './global.php'; ?> 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 '

You did not fill in all the fields or the email addresses are not valid. Please go back.

'; } @@ -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']); ?>

Complete

-

All the test emails were sent to in['receive'] ?>. Please check that you received all 4 tests.

+

All the test emails were sent to in['receive'] ?>. Please check that you received all 4 tests.

'; -print_r($bugsys); +print_r(get_class_vars('bugdar')); echo ''; -- 2.22.5