tdulik

EmailSender java class

Sep 24th, 2019
284
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package vyuka;
  2. import java.net.*;
  3. import java.io.*;
  4.  
  5. public class EmailSender {
  6.     /*
  7.      * Constructor opens Socket to host/port. If the Socket throws an exception during opening,
  8.      * the exception is not handled in the constructor.
  9.      */
  10.     public EmailSender(String host, int port) throws UnknownHostException, IOException {
  11.        
  12.     }
  13.     /*
  14.      * sends email from an email address to an email address with some subject and text.
  15.      * If the Socket throws an exception during sending, the exception is not handled by this method.
  16.      */
  17.     public void send(String from, String to, String subject, String text) throws IOException {
  18.        
  19.     }
  20.    
  21.     /*
  22.      * sends QUIT and closes the socket
  23.      */
  24.     public void close() {
  25.        
  26.     }
  27. }
RAW Paste Data