diff --git a/ChangeLog b/ChangeLog index 3d042ce07..a227c4e46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,12 @@ Modified -flatContentAsString to use UTF-8 as the default fallback encoding for 8-bit content. + * SoObjects/Mailer/SOGoDraftObject.m + Modified _fillInReplyAddresses:replyToAll:envelope: + so that if there's no recipient, we add at least + ourself to the list. + Fixed a mem leak in the same method. + 2007-11-22 Wolfgang Sourdeau * UI/MailPartViewers/UIxMailRenderingContext.m diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index f56c1be80..0a65e754b 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -488,7 +488,19 @@ static BOOL showTextAttachmentsInline = NO; [to release]; } + /* If "to" is empty, we add at least ourself as a recipient! */ + if (![to count]) + { + [to removeAllObjects]; + + if ([[_envelope replyTo] count]) + [self _addEMailsOfAddresses: [_envelope replyTo] toArray: to]; + else + [self _addEMailsOfAddresses: [_envelope from] toArray: to]; + } + [allRecipients release]; + [addrs release]; } - (NSArray *) _attachmentBodiesFromPaths: (NSArray *) paths