tdulik

Email sender - Main class

Sep 24th, 2019
484
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package vyuka;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         // TODO Auto-generated method stub
  7.         try {
  8.             EmailSender sender = new EmailSender("smtp.utb.cz", 25);
  9.             sender.send("you@utb.cz", "you@utb.cz", "Email from Java", "Funguje to?\nSnad...");
  10.             sender.close();
  11.         } catch (Exception e) {
  12.             // TODO Auto-generated catch block
  13.             e.printStackTrace();
  14.         }
  15.     }
  16. }
RAW Paste Data