Monotone-Parent: 54264028f33a54d13b69aeb1d296454517d33171
Monotone-Revision: 2e93af5446f533d239d1daf98838f4049e3256a0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-08T15:40:47 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
7cffd28608
commit
1aa527535b
|
@ -1,3 +1,10 @@
|
|||
2008-07-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoCalendarComponent.m
|
||||
([SOGoCalendarComponent
|
||||
-sendEMailUsingTemplateNamed:_pageNameforOldObject:_oldObjectandNewObject:_newObjecttoAttendees:_attendees]):
|
||||
take the current user as originator rather than the object's owner.
|
||||
|
||||
2008-07-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoObject.m ([SOGoObject
|
||||
|
|
|
@ -256,8 +256,7 @@ static BOOL sendEMailNotifications = NO;
|
|||
toAttendees: (NSArray *) _attendees
|
||||
{
|
||||
NSString *pageName;
|
||||
iCalPerson *organizer;
|
||||
NSString *email, *sender, *iCalString;
|
||||
NSString *senderEmail, *shortSenderEmail, *email, *iCalString;
|
||||
WOApplication *app;
|
||||
unsigned i, count;
|
||||
iCalPerson *attendee;
|
||||
|
@ -268,6 +267,7 @@ static BOOL sendEMailNotifications = NO;
|
|||
NGMimeMessage *msg;
|
||||
NGMimeBodyPart *bodyPart;
|
||||
NGMimeMultipartBody *body;
|
||||
SOGoUser *currentUser;
|
||||
|
||||
if (sendEMailNotifications
|
||||
&& [_newObject isStillRelevant])
|
||||
|
@ -276,11 +276,13 @@ static BOOL sendEMailNotifications = NO;
|
|||
if (count)
|
||||
{
|
||||
/* sender */
|
||||
organizer = [_newObject organizer];
|
||||
sender = [organizer mailAddress];
|
||||
currentUser = [context activeUser];
|
||||
shortSenderEmail = [[currentUser allEmails] objectAtIndex: 0];
|
||||
senderEmail = [NSString stringWithFormat: @"%@ <%@>",
|
||||
[currentUser cn], shortSenderEmail];
|
||||
|
||||
NSLog (@"sending '%@' from %@",
|
||||
[(iCalCalendar *) [_newObject parent] method], organizer);
|
||||
[(iCalCalendar *) [_newObject parent] method], senderEmail);
|
||||
|
||||
/* generate iCalString once */
|
||||
iCalString = [[_newObject parent] versitString];
|
||||
|
@ -324,7 +326,7 @@ static BOOL sendEMailNotifications = NO;
|
|||
* so we'll stick with multipart/mixed for the time being.
|
||||
*/
|
||||
[headerMap setObject: @"multipart/mixed" forKey: @"content-type"];
|
||||
[headerMap setObject: sender forKey: @"from"];
|
||||
[headerMap setObject: senderEmail forKey: @"from"];
|
||||
[headerMap setObject: recipient forKey: @"to"];
|
||||
mailDate = [[NSCalendarDate date] rfc822DateString];
|
||||
[headerMap setObject: mailDate forKey: @"date"];
|
||||
|
@ -364,7 +366,7 @@ static BOOL sendEMailNotifications = NO;
|
|||
[[SOGoMailer sharedMailer]
|
||||
sendMimePart: msg
|
||||
toRecipients: [NSArray arrayWithObject: email]
|
||||
sender: [organizer rfc822Email]];
|
||||
sender: shortSenderEmail];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue