Advertisement
tdulik

Email sender - Main class

Sep 24th, 2019
1,147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement