From a813e388974d62b6a91b05b19a1010fbd82d9558 Mon Sep 17 00:00:00 2001 From: Patrice Levesque Date: Wed, 17 Feb 2016 16:30:38 -0500 Subject: [PATCH] Comment out sendMail method in SOGoDraftObject and replace its sole known usage by sendMailAndCopyToSent. In a 2011-09-26 commit (in Changelog.old), I understand the author wanted to phase sendMail out and replace it by sendMailAndCopyToSent. Since there are compilation warnings related to sendMail, removing the sendMail method and replacing the sole call to it seemed like the cleanest way. --- SoObjects/Mailer/SOGoDraftObject.h | 2 +- SoObjects/Mailer/SOGoDraftObject.m | 3 +++ UI/MailerUI/UIxMailEditor.m | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SoObjects/Mailer/SOGoDraftObject.h b/SoObjects/Mailer/SOGoDraftObject.h index cf4e06d27..0b1eeb93f 100644 --- a/SoObjects/Mailer/SOGoDraftObject.h +++ b/SoObjects/Mailer/SOGoDraftObject.h @@ -114,7 +114,7 @@ - (NSArray *) allBareRecipients; - (NSException *) delete; -- (NSException *) sendMail; +/* - (NSException *) sendMail; */ - (NSException *) sendMailAndCopyToSent: (BOOL) copyToSent; /* default: YES */ - (NSException *) save; diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 1b0f7ac19..35f414086 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -69,6 +69,7 @@ #import "SOGoDraftObject.h" + static NSString *contentTypeValue = @"text/plain; charset=utf-8"; static NSString *htmlContentTypeValue = @"text/html; charset=utf-8"; static NSString *headerKeys[] = {@"subject", @"to", @"cc", @"bcc", @@ -1782,6 +1783,7 @@ static NSString *userAgent = nil; // // // +/* - (NSException *) sendMail { SOGoUserDefaults *ud; @@ -1843,6 +1845,7 @@ static NSString *userAgent = nil; } return [self sendMailAndCopyToSent: YES]; } +*/ // // diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index bc372eb7b..243bfc8df 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -869,7 +869,7 @@ static NSArray *infoKeys = nil; { error = [self validateForSend]; if (!error) - error = [co sendMail]; + error = [co sendMailAndCopyToSent: false]; else error = [self failedToSaveFormResponse: [error reason]]; }