public void send(Envelope envelope) throws IOException {
        /* Send all the necessary commands to send a message. Call
        sendCommand() to do the dirty work. Do _not_ catch the
        exception thrown from sendCommand(). */
        String mailFrom = "MAIL FROM: " + envelope.Sender + CRLF;
        sendCommand(mailFrom, 250);
        
        String[] recipients;//string array to store multiple recipients
        if((envelope.Recipient).contains("; ")){
        	recipients = (envelope.Recipient).split("; ");
        	for(int i = 0; i<recipients.length;i++){
        		sendCommand("RCPT TO: "+recipients[i]+ CRLF, 250);//send message to recipients
        	}
        }else{
        String rcpTo = "RCPT TO: "+envelope.Recipient+ CRLF;//if there is only one recipient, send message to him
        sendCommand(rcpTo, 250); 
        }
        
        if(!envelope.Cc.equals("")){//if Cc field is not empty
        String[] Ccs;//store multiple Cc
        if((envelope.Cc).contains("; ")){
        	Ccs = (envelope.Cc).split("; ");
        	for(int i = 0; i<Ccs.length;i++){
        		sendCommand("RCPT TO: "+Ccs[i]+ CRLF, 250);//send message to Ccs
        	}
        }else{
        String ccTo = "RCPT TO: "+envelope.Cc+ CRLF;//send message to Cc
        sendCommand(ccTo, 250); 
        }
        }
        
        String dataLine = "DATA" + CRLF;
        sendCommand(dataLine, 354);//send data command
        String messageLine = "Subject: "+ envelope.Message.Headers+ CRLF + envelope.Message.Body+CRLF +"." + CRLF;
        sendCommand(messageLine, 250);//send sunject command

    }