mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-08 11:59:44 +00:00
feat(accounts): Can now add smtp server to auxilliary accounts
This commit is contained in:
@@ -148,6 +148,13 @@
|
||||
return [[self alloc] initWithDomainDefaults: dd];
|
||||
}
|
||||
|
||||
+ (SOGoMailer *) mailerWithDomainDefaultsAndSmtpUrl: (SOGoDomainDefaults *) dd
|
||||
smtpUrl: (NSURL *) smtpUrl
|
||||
{
|
||||
return [[self alloc] initWithDomainDefaultsAndSmtpUrl: dd
|
||||
smtpUrl: smtpUrl];
|
||||
}
|
||||
|
||||
- (id) initWithDomainDefaults: (SOGoDomainDefaults *) dd
|
||||
{
|
||||
if ((self = [self init]))
|
||||
@@ -157,8 +164,23 @@
|
||||
smtpMasterUserEnabled = [dd smtpMasterUserEnabled];
|
||||
ASSIGN (smtpMasterUserUsername, [dd smtpMasterUserUsername]);
|
||||
ASSIGN (smtpMasterUserPassword, [dd smtpMasterUserPassword]);
|
||||
ASSIGN (authenticationType,
|
||||
[[dd smtpAuthenticationType] lowercaseString]);
|
||||
ASSIGN (authenticationType, [[dd smtpAuthenticationType] lowercaseString]);
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithDomainDefaultsAndSmtpUrl: (SOGoDomainDefaults *) dd
|
||||
smtpUrl: (NSURL *) smtpUrl
|
||||
{
|
||||
if ((self = [self init]))
|
||||
{
|
||||
ASSIGN (mailingMechanism, [dd mailingMechanism]);
|
||||
ASSIGN (smtpServer, [smtpUrl absoluteString]);
|
||||
smtpMasterUserEnabled = [dd smtpMasterUserEnabled];
|
||||
ASSIGN (smtpMasterUserUsername, [dd smtpMasterUserUsername]);
|
||||
ASSIGN (smtpMasterUserPassword, [dd smtpMasterUserPassword]);
|
||||
ASSIGN (authenticationType, [[dd smtpAuthenticationType] lowercaseString]);
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -242,9 +264,12 @@
|
||||
NGSmtpClient *client;
|
||||
NSException *result;
|
||||
NSURL * smtpUrl;
|
||||
SOGoUser* user;
|
||||
|
||||
result = nil;
|
||||
|
||||
//find the smtpurl for the account
|
||||
|
||||
smtpUrl = [[[NSURL alloc] initWithString: smtpServer] autorelease];
|
||||
|
||||
client = [NGSmtpClient clientWithURL: smtpUrl];
|
||||
|
||||
Reference in New Issue
Block a user