Minor fixes for recent mail to email feature.

This commit is contained in:
Retro_Guy 2024-10-08 09:51:34 -07:00
parent 59a5eb7f4d
commit dac8126900
2 changed files with 12 additions and 10 deletions

View File

@ -181,7 +181,7 @@ if ($do_mail_update == true) {
function import_user_message($from, $rcpt, $date, $subject, $message)
{
global $config_dir, $spooldir, $OVERRIDES;
global $CONFIG, $config_dir, $spooldir, $OVERRIDES;
if (($to = get_config_value('aliases.conf', strtolower($rcpt))) == false) {
$to = strtolower($rcpt);

View File

@ -254,6 +254,7 @@ if (isset($_POST['sendMessage'])) {
}
// Send internet email notification here
if (strpos('@', $to) === false) {
$user_config = unserialize(file_get_contents($config_dir . '/userconfig/' . $to . '.config'));
if ($user_config['send_mail_to_email'] == 'true') {
$email_subject = "New Mail in your Inbox from " . $from . " on " . ltrim($CONFIG['server_path'], "@");
@ -266,6 +267,7 @@ if (isset($_POST['sendMessage'])) {
}
}
}
}
$return_val = "Message sent.";
} else {
$return_val = "Failed to Send. Database Error";