feat(accounts): Can now add smtp server to auxilliary accounts

This commit is contained in:
Hivert Quentin
2024-01-23 14:16:02 +01:00
parent 59bd290d62
commit f0010afef4
13 changed files with 293 additions and 48 deletions

View File

@@ -71,6 +71,7 @@
- (void) dealloc
{
[imap4URL release];
[smtp4URL release];
[imap4 release];
[super dealloc];
}
@@ -317,6 +318,35 @@
return imap4URL;
}
- (NSURL *) smtp4URL
{
SOGoMailAccount *account;
NSString *urlString, *smtpUrl;
NSString *useTls = @"NO";
/* this could probably be handled better from NSURL but it's buggy in
GNUstep */
if (!smtp4URL)
{
account = [self mailAccountFolder];
smtpUrl = [account smtp4URLString];
if(smtpUrl)
{
if ([[account smtpEncryption] isEqualToString: @"tls"])
{
useTls = @"YES";
}
urlString = [NSString stringWithFormat: @"%@?tls=%@&tlsVerifyMode=%@",
smtpUrl, useTls, [account smtpTlsVerifyMode]];
smtp4URL = [[NSURL alloc] initWithString: urlString];
}
else
smtp4URL = nil;
}
return smtp4URL;
}
- (NSString *) imap4PasswordRenewed: (BOOL) renewed
{
return [[self mailAccountFolder] imap4PasswordRenewed: renewed];