{
chdir('../');
}
-require_once('./global.php');
+require_once './global.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<?php
-if (empty($bugsys->in['__submit__']))
+if (empty($input->in['__submit__']))
{
?>
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>';
}
{
// 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
}