package businessLogic;
+import javax.mail.MessagingException;
+
import dataAccess.DB4oManager;
import domain.Account;
}
public boolean addAccount(Account ac){
- if(this.dbMngr.addAccount(ac))
+ if(this.dbMngr.addAccount(ac)){
+ try {
+ MailManager.getInstance().Send(ac.getOwner().getMailAccount(), "Entered into the system", "Congratulations");
+ } catch (MessagingException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
return true;
+ }
return false;
}