new option REWRITE_MESSAGE_ID enables you to rewrite the message-id of the restored message

This commit is contained in:
SJ 2012-11-14 15:28:39 +01:00
parent 90ef9dc0e2
commit acb3790a0f
2 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,7 @@ define('ENABLE_GOOGLE_LOGIN', 0);
define('SEARCH_RESULT_CHECKBOX_CHECKED', 1); define('SEARCH_RESULT_CHECKBOX_CHECKED', 1);
define('HELPER_URL', ''); define('HELPER_URL', '');
define('ENABLE_SYSLOG', 0); define('ENABLE_SYSLOG', 0);
define('REWRITE_MESSAGE_ID', 0);
define('GOOGLE_CLIENT_ID', 'xxxxxxxxxxx'); define('GOOGLE_CLIENT_ID', 'xxxxxxxxxxx');
define('GOOGLE_CLIENT_SECRET', 'xxxxxxxxxxxxx'); define('GOOGLE_CLIENT_SECRET', 'xxxxxxxxxxxxx');
define('GOOGLE_DEVELOPER_KEY', 'xxxxxxxxxxxx'); define('GOOGLE_DEVELOPER_KEY', 'xxxxxxxxxxxx');

View File

@ -8,6 +8,10 @@ class ModelMailMail extends Model {
if($to == "" || strlen($msg) < 30){ return $ok; } if($to == "" || strlen($msg) < 30){ return $ok; }
if(REWRITE_MESSAGE_ID == 1) {
$msg = preg_replace("/Message-ID:([\ \w\_\-\@\<\>\.\r]+)\n/i", "Message-ID: <" . generate_random_string(25) . '@' . SITE_NAME . ">\n", $msg);
}
$r = fsockopen($smtphost, $smtpport); $r = fsockopen($smtphost, $smtpport);
if(!$r){ return -1; } if(!$r){ return -1; }