mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-03 12:28:51 +00:00
feat(core): Support smtps and STARTTLS for SMTP
Support uri schemes for SMTP, enabling STARTTLS and SMTPS for SMTP connections. The new format for configuration value SMTPServer supports passing a URI scheme (either smtp:// or smtps://). To support old configurations, if no scheme is given, smtp:// is assumed. Fixes #31
This commit is contained in:
@@ -242,7 +242,15 @@
|
||||
|
||||
- (NSString *) smtpServer
|
||||
{
|
||||
return [self stringForKey: @"SOGoSMTPServer"];
|
||||
NSString *server;
|
||||
server = [self stringForKey: @"SOGoSMTPServer"];
|
||||
// backwards compatibility
|
||||
if (![server hasPrefix: @"smtp://"] &&
|
||||
![server hasPrefix: @"smtps://"])
|
||||
{
|
||||
return [NSString stringWithFormat: @"smtp://%@", server];
|
||||
}
|
||||
return server;
|
||||
}
|
||||
|
||||
- (NSString *) smtpAuthenticationType
|
||||
|
||||
Reference in New Issue
Block a user