Minor fixes for recent mail to email feature.
This commit is contained in:
parent
59a5eb7f4d
commit
dac8126900
|
@ -181,7 +181,7 @@ if ($do_mail_update == true) {
|
||||||
|
|
||||||
function import_user_message($from, $rcpt, $date, $subject, $message)
|
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) {
|
if (($to = get_config_value('aliases.conf', strtolower($rcpt))) == false) {
|
||||||
$to = strtolower($rcpt);
|
$to = strtolower($rcpt);
|
||||||
|
|
|
@ -254,15 +254,17 @@ if (isset($_POST['sendMessage'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send internet email notification here
|
// Send internet email notification here
|
||||||
$user_config = unserialize(file_get_contents($config_dir . '/userconfig/' . $to . '.config'));
|
if (strpos('@', $to) === false) {
|
||||||
if ($user_config['send_mail_to_email'] == 'true') {
|
$user_config = unserialize(file_get_contents($config_dir . '/userconfig/' . $to . '.config'));
|
||||||
$email_subject = "New Mail in your Inbox from " . $from . " on " . ltrim($CONFIG['server_path'], "@");
|
if ($user_config['send_mail_to_email'] == 'true') {
|
||||||
if (get_user_config($to, 'email_verified') == 'true') {
|
$email_subject = "New Mail in your Inbox from " . $from . " on " . ltrim($CONFIG['server_path'], "@");
|
||||||
if ($email_address = get_user_config($to, 'email')) {
|
if (get_user_config($to, 'email_verified') == 'true') {
|
||||||
$message = "\nYou have received mail from " . $from . " on " . ltrim($CONFIG['server_path'], "@") . "\n\n-----\n" . $message;
|
if ($email_address = get_user_config($to, 'email')) {
|
||||||
$message = rtrim($message);
|
$message = "\nYou have received mail from " . $from . " on " . ltrim($CONFIG['server_path'], "@") . "\n\n-----\n" . $message;
|
||||||
$message .= "\n-----\n\nTo Reply, log into site and view Mail";
|
$message = rtrim($message);
|
||||||
send_internet_email($email_subject, $message, $email_address);
|
$message .= "\n-----\n\nTo Reply, log into site and view Mail";
|
||||||
|
send_internet_email($email_subject, $message, $email_address);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue