From 595d15a06cc528705b9ad8ceac58725a4c89b8c6 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 22 May 2008 15:46:49 +0000 Subject: [PATCH] Monotone-Parent: cbd05d470bee2e063abb94750478a7df2245b44b Monotone-Revision: b60062325db9b515049a18a0ab18bb9e528b1499 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-05-22T15:46:49 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/Mailer/SOGoDraftObject.m | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6c1d3cd39..518998723 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-22 Wolfgang Sourdeau + + * SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject + -sendMail]): the email passed as parameter to sendmail is now the + bare user email. + 2008-05-21 Wolfgang Sourdeau * UI/MailerUI/UIxMailFolderActions.m ([UIxMailFolderActions diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index ae5e8137c..10f45b944 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -1269,6 +1269,21 @@ static BOOL showTextAttachmentsInline = NO; return allRecipients; } +- (NSArray *) allBareRecipients +{ + NSMutableArray *bareRecipients; + NSEnumerator *allRecipients; + NSString *recipient; + + bareRecipients = [NSMutableArray array]; + + allRecipients = [[self allRecipients] objectEnumerator]; + while ((recipient = [allRecipients nextObject])) + [bareRecipients addObject: [recipient pureEMailAddress]]; + + return bareRecipients; +} + - (NSException *) sendMail { NSException *error; @@ -1284,7 +1299,7 @@ static BOOL showTextAttachmentsInline = NO; { message = [self mimeMessageAsData]; error = [[SOGoMailer sharedMailer] sendMailData: message - toRecipients: [self allRecipients] + toRecipients: [self allBareRecipients] sender: [self sender]]; if (!error) {