|
|
|
@ -240,42 +240,50 @@ else {
|
|
|
|
|
echo "<br/>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Test SMTP config</h3>
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
Server: <?php echo rcube_utils::parse_host($RCI->getprop('smtp_server', 'localhost')); ?><br />
|
|
|
|
|
Port: <?php echo $RCI->getprop('smtp_port'); ?><br />
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
if ($RCI->getprop('smtp_server')) {
|
|
|
|
|
$user = $RCI->getprop('smtp_user', '(none)');
|
|
|
|
|
$pass = $RCI->getprop('smtp_pass', '(none)');
|
|
|
|
|
$user = $RCI->getprop('smtp_user', '(none)');
|
|
|
|
|
$pass = $RCI->getprop('smtp_pass', '(none)');
|
|
|
|
|
|
|
|
|
|
if ($user == '%u') {
|
|
|
|
|
$user_field = new html_inputfield(array('name' => '_smtp_user'));
|
|
|
|
|
if ($user == '%u') {
|
|
|
|
|
$user_field = new html_inputfield(array('name' => '_smtp_user', 'id' => 'smtp_user'));
|
|
|
|
|
$user = $user_field->show($_POST['_smtp_user']);
|
|
|
|
|
}
|
|
|
|
|
if ($pass == '%p') {
|
|
|
|
|
$pass_field = new html_passwordfield(array('name' => '_smtp_pass'));
|
|
|
|
|
}
|
|
|
|
|
if ($pass == '%p') {
|
|
|
|
|
$pass_field = new html_passwordfield(array('name' => '_smtp_pass', 'id' => 'smtp_pass'));
|
|
|
|
|
$pass = $pass_field->show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "User: $user<br />";
|
|
|
|
|
echo "Password: $pass<br />";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$from_field = new html_inputfield(array('name' => '_from', 'id' => 'sendmailfrom'));
|
|
|
|
|
$to_field = new html_inputfield(array('name' => '_to', 'id' => 'sendmailto'));
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<h3>Test SMTP config</h3>
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
<table>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><label for="smtp_server">Server</label></td>
|
|
|
|
|
<td><?php echo rcube_utils::parse_host($RCI->getprop('smtp_server', 'localhost')); ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><label for="smtp_port">Port</label></td>
|
|
|
|
|
<td><?php echo $RCI->getprop('smtp_port'); ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><label for="smtp_user">Sender</label></td>
|
|
|
|
|
<td><?php echo $user; ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><label for="smtp_pass">Recipient</label></td>
|
|
|
|
|
<td><?php echo $pass; ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$from_field = new html_inputfield(array('name' => '_from', 'id' => 'sendmailfrom'));
|
|
|
|
|
$to_field = new html_inputfield(array('name' => '_to', 'id' => 'sendmailto'));
|
|
|
|
|
|
|
|
|
|
if (isset($_POST['sendmail'])) {
|
|
|
|
|
|
|
|
|
|
echo '<p>Trying to send email...<br />';
|
|
|
|
|