KSmtp: Option to use system proxy settings

Authored by marten on Mar 1 2018, 1:09 PM.



This is to provide an explicit option whether to use the system proxy setting for SMTP connections, as described in T7430.

If the system proxy settings are set to use the environment variables http_proxy etc (for compatibility with non-KDE applications), then they are also used for SMTP connections. This is rarely required and will fail unless the proxy is transparent enough. See https://bugs.kde.org/show_bug.cgi?id=379539 and related bugs.

This change adds a SMTP option to use the proxy for connection (the default is off). This is the core part of the change in KSmtp; the configuration option and the visible GUI part in KMailTransport will follow in another diff.

Test Plan

Built KSmtp with this change, verified that by default the SMTP connection is not made via the proxy and that mail sending works as expected. Verified that, if the option is set, the SMTP connection is made via the proxy.

Diff Detail

R733 KSmtp
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
marten created this revision.Mar 1 2018, 1:09 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptMar 1 2018, 1:09 PM
marten requested review of this revision.Mar 1 2018, 1:09 PM
dvratil accepted this revision.Mar 2 2018, 8:50 AM
dvratil added a subscriber: dvratil.

Thanks for the patch!

This revision is now accepted and ready to land.Mar 2 2018, 8:50 AM
This revision was automatically updated to reflect the committed changes.