|  |  | @ -76,6 +76,10 @@ public class RecruitServlet extends MailerServlet | 
			
		
	
		
		
			
				
					
					|  |  |  | 					String fieldName = item.getFieldName(); |  |  |  | 					String fieldName = item.getFieldName(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 					fileName = item.getName(); |  |  |  | 					fileName = item.getName(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 					file = item.get(); |  |  |  | 					file = item.get(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 					if( file == null || file.length == 0 ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 					{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 						isMultipart = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 					} | 
			
		
	
		
		
			
				
					
					|  |  |  | 					type = item.getContentType(); |  |  |  | 					type = item.getContentType(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 				} |  |  |  | 				} | 
			
		
	
		
		
			
				
					
					|  |  |  | 			} |  |  |  | 			} | 
			
		
	
	
		
		
			
				
					|  |  | @ -96,20 +100,23 @@ public class RecruitServlet extends MailerServlet | 
			
		
	
		
		
			
				
					
					|  |  |  | 		String subject = "Envio de CV através do site www.siprp.pt"; |  |  |  | 		String subject = "Envio de CV através do site www.siprp.pt"; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		// manda mail
 |  |  |  | 		// manda mail
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		boolean success; |  |  |  | 		boolean success; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		String nome = ( String ) PROPERTIES.get( REC_NOME );  |  |  |  | 		String nome = ( String ) parameters.get( REC_NOME );  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		String telefone = ( String ) PROPERTIES.get( REC_TELEFONE ); |  |  |  | 		String telefone = ( String ) parameters.get( REC_TELEFONE ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		String mail = ( String ) PROPERTIES.get( REC_EMAIL ); |  |  |  | 		String mail = ( String ) parameters.get( REC_EMAIL ); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		if( nome == null || nome.trim().length() == 0 || telefone == null || telefone.trim().length() == 0 || |  |  |  | 		if( nome == null || nome.trim().length() == 0 || telefone == null || telefone.trim().length() == 0 || | 
			
		
	
		
		
			
				
					
					|  |  |  | 			mail == null || mail.trim().length() == 0 || mail.indexOf( '@' ) == -1 ) |  |  |  | 			mail == null || mail.trim().length() == 0 || mail.indexOf( '@' ) == -1 ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 		{ |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | System.out.println( "nome: " + nome + " teefone: "  + telefone + " email : " + email  ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			success = false; |  |  |  | 			success = false; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 		else if( isMultipart ) |  |  |  | 		else if( isMultipart ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 		{ |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | System.out.println( "Multipart" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			success = sendMail( from, destination, subject, content, false, fileName, file, type ); |  |  |  | 			success = sendMail( from, destination, subject, content, false, fileName, file, type ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 		else |  |  |  | 		else | 
			
		
	
		
		
			
				
					
					|  |  |  | 		{ |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | System.out.println( "Normal" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			success = sendMail( from, destination, subject, content, false ); |  |  |  | 			success = sendMail( from, destination, subject, content, false ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |