* Notifications: fixed not used SMTP authentication and selection of mail account

This commit is contained in:
Ralf Becker 2014-06-05 10:36:13 +00:00
parent f5d4cdf7c0
commit 6efc08cc0a
2 changed files with 6 additions and 5 deletions

View File

@ -10,6 +10,7 @@
</tr> </tr>
<!-- END header --> <!-- END header -->
<!-- BEGIN body --> <!-- BEGIN body -->
<!-- currently not used, might be reactived later
<tr class="th"> <tr class="th">
<td colspan="2">&nbsp;<b>{lang_Mail_backend}</b></td> <td colspan="2">&nbsp;<b>{lang_Mail_backend}</b></td>
</tr> </tr>
@ -21,9 +22,9 @@
<option value="True"{selected_dontUseUserDefinedProfiles_True}>{lang_Emailadmin_Profile_only_(Do_not_use_User_defined_(active)_Mail_Profiles_for_Notification)}</option> <option value="True"{selected_dontUseUserDefinedProfiles_True}>{lang_Emailadmin_Profile_only_(Do_not_use_User_defined_(active)_Mail_Profiles_for_Notification)}</option>
</select> </select>
</td> </td>
</tr> </tr -->
<tr class="th"> <tr class="th">
<td colspan="2">&nbsp;<b>{lang_eGroupWare-Popup_backend}</b></td> <td colspan="2">&nbsp;<b>{lang_EGroupware-Popup_backend}</b></td>
</tr> </tr>
<tr class="row_on"> <tr class="row_on">
<td>{lang_Poll_interval}</td> <td>{lang_Poll_interval}</td>

View File

@ -13,7 +13,7 @@
/** /**
* New eGW send-class. It implements the old interface (msg-method) on top of PHPMailer. * New eGW send-class. It implements the old interface (msg-method) on top of PHPMailer.
* *
* The configuration is read from Admin >> Site configuration and it does NOT depend on one of the email-apps anymore. * The configuration is read via emailadmin_account::get_default_acc_id(true); // true=SMTP
*/ */
class send extends egw_mailer class send extends egw_mailer
{ {
@ -42,7 +42,7 @@ class send extends egw_mailer
$this->IsSmtp(); $this->IsSmtp();
// smtp settings from default account of current user // smtp settings from default account of current user
$account = emailadmin_account::read(emailadmin_account::get_default_acc_id()); $account = emailadmin_account::read(emailadmin_account::get_default_acc_id(true)); // true=SMTP
$this->Host = $account->acc_smtp_host; $this->Host = $account->acc_smtp_host;
$this->Port = $account->acc_smtp_port; $this->Port = $account->acc_smtp_port;
switch($account->acc_smtp_ssl) switch($account->acc_smtp_ssl)
@ -56,7 +56,7 @@ class send extends egw_mailer
case emailadmin_account::SSL_STARTTLS: // PHPMailer uses 'tls' for STARTTLS, not ssl connection with tls version >= 1 and no sslv2/3 case emailadmin_account::SSL_STARTTLS: // PHPMailer uses 'tls' for STARTTLS, not ssl connection with tls version >= 1 and no sslv2/3
$this->Host = 'tls://'.$this->Host; $this->Host = 'tls://'.$this->Host;
} }
$this->smtpAuth = !empty($account->acc_smtp_username); $this->SMTPAuth = !empty($account->acc_smtp_username);
$this->Username = $account->acc_smtp_username; $this->Username = $account->acc_smtp_username;
$this->Password = $account->acc_smtp_password; $this->Password = $account->acc_smtp_password;
$this->defaultDomain = $account->acc_domain; $this->defaultDomain = $account->acc_domain;