use notifications option/configuration to enforce the use of emailadminprofiles only for notifications

This commit is contained in:
Klaus Leithoff 2010-07-16 12:04:51 +00:00
parent f67a9e4a56
commit f71cd37af6

View File

@ -56,11 +56,15 @@
} }
$this->SetLanguage($lang,$lang_path); $this->SetLanguage($lang,$lang_path);
$this->IsSmtp(); $this->IsSmtp();
$restoreSession = $getUserDefinedProfiles = true;
$bopreferences =& CreateObject('felamimail.bopreferences'); // if dontUseUserDefinedProfiles is set to yes/true/1 dont restore the session AND dont retrieve UserdefinedAccount settings
$notification_config = config::read('notifications');
if ($notification_config['dontUseUserDefinedProfiles']) $restoreSession = $getUserDefinedProfiles = false;
$bopreferences =& CreateObject('felamimail.bopreferences',$restoreSession);
if ($bopreferences) { if ($bopreferences) {
if ($this->debug) error_log(__METHOD__." using felamimail preferences for mailing."); if ($this->debug) error_log(__METHOD__." using felamimail preferences for mailing.");
$preferences = $bopreferences->getPreferences(); // if dontUseUserDefinedProfiles is set to yes/true/1 dont retrieve UserdefinedAccount settings
$preferences = $bopreferences->getPreferences($getUserDefinedProfiles);
if ($preferences) { if ($preferences) {
$ogServer = $preferences->getOutgoingServer(0); $ogServer = $preferences->getOutgoingServer(0);
if ($ogServer) { if ($ogServer) {