private void sendEmail() {

		String response;

		try {
			outPutStream.write(MailFrom + sender + CRLF);
			outPutStream.flush();
			System.out.println(MailFrom + sender + CRLF);

			response = getResponse();
			System.out.println(response);
			if (!response.startsWith(OK_CODE)) {
				throw new IOException();
			}

			outPutStream.write(MailTo + this.mailTo + CRLF);
			outPutStream.flush();
			System.out.println(MailTo + this.mailTo + CRLF);

			response = getResponse();
			System.out.println(response);
			if (!response.startsWith(OK_CODE)) {
				throw new IOException();
			}

			outPutStream.write(DATA + CRLF);
			outPutStream.flush();
			System.out.println(DATA + CRLF);

			response = getResponse();
			System.out.println(response);
			if (!response.startsWith(DATA_OK_CODE)) {
				throw new IOException();
			}

			// Mail context part.
			StringBuilder mailContent = new StringBuilder();
			mailContent.append(SubjectHeader);
			mailContent.append(this.subject);
			mailContent.append(CRLF);
			mailContent.append(FromHeader);
			mailContent.append(From_Name);
			mailContent.append(CRLF);
			mailContent.append(SenderHeader);
			mailContent.append(sender);
			mailContent.append(CRLF);
			mailContent.append(CRLF);
			mailContent.append(this.data);
			mailContent.append(CRLF);
			mailContent.append(".");
			mailContent.append(CRLF);

			outPutStream.write(mailContent.toString());
			outPutStream.flush();
			System.out.println(mailContent.toString());

			response = getResponse();
			System.out.println(response);
			if (!response.startsWith(OK_CODE)) {
				throw new IOException();
			}

			outPutStream.write(QUIT + CRLF);
			outPutStream.flush();
			System.out.println(QUIT + CRLF);

			response = getResponse();
			System.out.println(response);
			if (!response.startsWith(SESSION_OK_CODE)) {
				throw new IOException();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

	}