Index: /branches/2.4/prototype/config/user.ini
===================================================================
--- /branches/2.4/prototype/config/user.ini	(revision 5804)
+++ /branches/2.4/prototype/config/user.ini	(revision 6644)
@@ -15,7 +15,7 @@
 insertOwnerLink = modules/calendar/interceptors/DBMapping.php
 
-[OpenLDAP.before.create]
-encodeURIUser = modules/calendar/interceptors/DBMapping.php
-encodeCreateConcept = modules/calendar/interceptors/DBMapping.php
+;[OpenLDAP.before.create]
+;encodeURIUser = modules/calendar/interceptors/DBMapping.php
+;encodeCreateConcept = modules/calendar/interceptors/DBMapping.php
 
 [OpenLDAP.before.find]
Index: /branches/2.4/expressoMail1_2/templates/default/main.css
===================================================================
--- /branches/2.4/expressoMail1_2/templates/default/main.css	(revision 6251)
+++ /branches/2.4/expressoMail1_2/templates/default/main.css	(revision 6644)
@@ -1046,4 +1046,12 @@
 }
 
+div.new-event-win.active div.button-files-upload{ 
+    margin: 15px 0 0 0; 
+} 
+ 
+div.new-event-win.active div.files-list{ 
+    margin: 45px 0 0 0; 
+} 
+ 		 
 /*#divAppbox
 { background: #fff url( ../images/bgBlockContent.jpg ) repeat-x; border-color: #9c9c9c; }
Index: /branches/2.4/expressoMail1_2/js/draw_api.js
===================================================================
--- /branches/2.4/expressoMail1_2/js/draw_api.js	(revision 6636)
+++ /branches/2.4/expressoMail1_2/js/draw_api.js	(revision 6644)
@@ -3034,32 +3034,55 @@
 					location: '',
 					attendee: $.map(emails, function( mail ){			
-						
+						var contact = false;
 						var decoded =  Encoder.htmlDecode(mail);
 						var newAttendeeName = "";
 
-						var user = DataLayer.get('user', ["=", "mail", decoded.match(/<([^<]*)>[\s]*$/) ? decoded.match(/<([^<]*)>[\s]*$/)[1].toLowerCase() : decoded], true);
+						var name = decoded.match(/"([^"]*)"/) ? decoded.match(/"([^"]*)"/)[1] : ''; 
+                                                var mail = decoded.match(/<([^<]*)>[\s]*$/) ? decoded.match(/<([^<]*)>[\s]*$/)[1].toLowerCase() : decoded;  
+ 
+ 
+                                                var user = DataLayer.get('user', ["=", "mail", mail], true);
 						
 						if( $.type(user) == "array")
 						    user = user[0]; 
  		 
-                                                if(typeof(user) != 'object') 
+                                                if(user != ''){ 
+		                                    //user = {name : name , mail : mail}; 
+		                                    if(User.me.mail == user.mail) 
+		                                            return(null); 
+		                                    user.isExternal = (!!user && !(!!user.isExternal)) ? 0 : 1; 
+
+		                                    return  DataLayer.merge({ 
+		                                            name: user.name, 
+		                                            mail: user.mail, 
+		                                            acl:  'r', 
+		                                            delegatedFrom: '0', 
+		                                            status: '4', 
+		                                            isExternal: user.isExternal 
+		                                    }, !!user.id ? {id : DataLayer.put('participant', {user: user.id, isExternal: user.isExternal})} : {id: DataLayer.put('participant', {user: user})});  
+		                                }else if(mail.match(/[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])/)){ 
+		                                     
+		                                    var userId = DataLayer.put('user', { 
+		                                        name: name,  
+		                                        mail: mail,  
+		                                        isExternal: '1' 
+		                                    }); 
+		                                    var newAttendeeId = DataLayer.put('participant', { 
+		                                        user: userId,  
+		                                        isExternal: '1' 
+		                                    }); 
+
+		                                    return  { 
+		                                            id: newAttendeeId, 
+		                                            name: name, 
+		                                            mail: mail, 
+		                                            acl:  'r', 
+		                                            delegatedFrom: '0', 
+		                                            status: '4', 
+		                                            isExternal: '1' 
+		                                    }; 
+		                                     
+		                                }else 
                                                     return (null);
-
-						if(!user)
-							user = {name : decoded.match(/"([^"]*)"/)[1] , mail : decoded.match(/[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])/)[1]};
-
-						if(User.me.mail == user.mail)
-							return(null);
-							
-						user.isExternal = (!!user && !(!!user.isExternal)) ? 0 : 1;
-
-						return  DataLayer.merge({
-							name: user.name,
-							mail: user.mail,
-							acl:  'r',
-							delegatedFrom: '0',
-							status: '4'
-						}, !!user.id ? {id : DataLayer.put('participant', {user: user.id, isExternal: user.isExternal})} : {id: DataLayer.put('participant', {user: user})}); 
-				
 					})	
 					
