Pascal Peridont 19 years ago
parent
commit
558b8d445f
1 changed files with 8 additions and 8 deletions
  1. 8 8
      std/mtwin/mail/Imap.hx

+ 8 - 8
std/mtwin/mail/Imap.hx

@@ -104,7 +104,7 @@ class Imap {
 		try{
 		try{
 			cnx.connect( Socket.resolve(host), port );
 			cnx.connect( Socket.resolve(host), port );
 		}catch( e : Dynamic ){
 		}catch( e : Dynamic ){
-			throw new ConnectionError(host,port);
+			throw ConnectionError(host,port);
 		}
 		}
 		debug("socket connected");
 		debug("socket connected");
 		cnx.setTimeout( 1 );
 		cnx.setTimeout( 1 );
@@ -114,7 +114,7 @@ class Imap {
 	function login( user : String, pass : String ){	
 	function login( user : String, pass : String ){	
 		var r = command("LOGIN",user+" "+pass,true);
 		var r = command("LOGIN",user+" "+pass,true);
 		if( !r.success ){
 		if( !r.success ){
-			throw new BadResponse(r.response);
+			throw BadResponse(r.response);
 		}
 		}
 	}
 	}
 	
 	
@@ -127,7 +127,7 @@ class Imap {
 	public function select( mailbox : String ){
 	public function select( mailbox : String ){
 		var r = command("SELECT",quote(mailbox),true);
 		var r = command("SELECT",quote(mailbox),true);
 		if( !r.success ) 
 		if( !r.success ) 
-			throw new BadResponse(r.response);
+			throw BadResponse(r.response);
 		
 		
 		var ret = {recent: 0,exists: 0,firstUnseen: null};
 		var ret = {recent: 0,exists: 0,firstUnseen: null};
 		for( v in r.result ){
 		for( v in r.result ){
@@ -152,7 +152,7 @@ class Imap {
 			r = command("LIST","\".\" \""+pattern+"\"",true);
 			r = command("LIST","\".\" \""+pattern+"\"",true);
 		}
 		}
 		if( !r.success ){
 		if( !r.success ){
-			throw new BadResponse(r.response);
+			throw BadResponse(r.response);
 		}
 		}
 
 
 		var ret = new List();
 		var ret = new List();
@@ -185,7 +185,7 @@ class Imap {
 		if( pattern == null ) pattern = "ALL";
 		if( pattern == null ) pattern = "ALL";
 		var r = command("SEARCH",pattern,true);
 		var r = command("SEARCH",pattern,true);
 		if( !r.success ){
 		if( !r.success ){
-			throw new BadResponse(r.response);
+			throw BadResponse(r.response);
 		}
 		}
 
 
 		var l = new List();
 		var l = new List();
@@ -216,7 +216,7 @@ class Imap {
 
 
 		var r = fetchRange( Std.string(id), section, useUid );
 		var r = fetchRange( Std.string(id), section, useUid );
 		if( !r.exists(id) ){
 		if( !r.exists(id) ){
-			throw new ImapFetchError(id);
+			throw ImapFetchError(id);
 		}
 		}
 		return r.get(id);
 		return r.get(id);
 	}
 	}
@@ -281,10 +281,10 @@ class Imap {
 				if( resp == "OK" ){
 				if( resp == "OK" ){
 					break;
 					break;
 				}else{
 				}else{
-					throw new BadResponse(l);
+					throw BadResponse(l);
 				}
 				}
 			}else{
 			}else{
-				throw new UnknowResponse(l);
+				throw UnknowResponse(l);
 			}
 			}
 		}
 		}