1 25 26 package net.killingar.forum.actions.email; 27 28 import net.killingar.forum.internal.User; 29 30 public class LoadSettings extends net.killingar.forum.actions.ActionForumSupport 31 { 32 String 34 from, 35 smtpServer; 36 37 public void setFrom(String in) { from = in; } 39 public void setSmtpServer(String in) { smtpServer = in; } 40 41 public String getFrom() { return from; } 43 public String getSmtpServer() { return smtpServer; } 44 45 protected String doExecute() 47 { 48 try 49 { 50 if (manager.getUserID() == -1) 51 manager.login("guest", "foo"); 52 53 User user = manager.getUser(manager.getUserID()); 54 55 from = user.getEmail(); 56 smtpServer = "smtpserver.swip.net"; 57 58 return SUCCESS; 59 } 60 catch (Exception e) 61 { 62 addErrorMessage("loading email options failed, exception thrown ("+e.toString()+")"); 63 e.printStackTrace(); 64 65 return ERROR; 66 } 67 } 68 } | Popular Tags |