Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions admin/templates/default/config.xet
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@
</vbox>
<textbox id="newsettings[recaptcha_site]" size="60"/>
</row>
<row>
<description value="Emails" span="all" class="subHeader"/>
</row>
<row>
<description value="Force sending email via Sendmail transport (local mail)" label="%s:"/>
<select id="newsettings[sendmail]">
<option value="">{No} - {Default}</option>
<option value="True">Yes</option>
</select>
</row>
</rows>
</grid>
</template>
Expand Down
5 changes: 4 additions & 1 deletion api/src/Mail/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ public function smtpTransport()
// Horde use locale for translation of error messages
Api\Preferences::setlocale(LC_MESSAGES);

if (!empty($GLOBALS['egw_info']['server']['sendmail']))
$api_config = Api\Config::read('phpgwapi');

if (!empty($GLOBALS['egw_info']['server']['sendmail']) ||
!empty($api_config['sendmail']))
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you add that code?

Your $api_config is identical to $GLOBALS['egw_info']['server'].

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I didn't found a way to make the changes in config file persistant across setup.php usage ; so I moved to DB configuration to have an in-browser configuration

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same thing, first thing EGroupware does is to read what you call DB configuration into $GLOBALS['egw_info']['server'] to the stuff already there from the header.inc.php.

So please remove/revert that, as it is unnecessary.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks (I did not knew that)

$this->smtpTransport = new Horde_Mail_Transport_Sendmail();
}
Expand Down