RRRRHHHH_Code
Diff Revisions
7bf57b ...
vs
6a5d4d ...
for ruralHouses/src/businessLogic/AccountManager.java
|
@@ -1,5 +1,7 @@ |
1 |
1 |
|
package businessLogic; |
2 |
2 |
|
|
|
3 |
+ |
import javax.mail.MessagingException; |
|
4 |
+ |
|
3 |
5 |
|
import dataAccess.DB4oManager; |
4 |
6 |
|
import domain.Account; |
5 |
7 |
|
|
|
@@ -18,8 +20,15 @@ |
18 |
20 |
|
} |
19 |
21 |
|
|
20 |
22 |
|
public boolean addAccount(Account ac){ |
21 |
|
- |
if(this.dbMngr.addAccount(ac)) |
|
23 |
+ |
if(this.dbMngr.addAccount(ac)){ |
|
24 |
+ |
try { |
|
25 |
+ |
MailManager.getInstance().Send(ac.getOwner().getMailAccount(), "Entered into the system", "Congratulations"); |
|
26 |
+ |
} catch (MessagingException e) { |
|
27 |
+ |
// TODO Auto-generated catch block |
|
28 |
+ |
e.printStackTrace(); |
|
29 |
+ |
} |
22 |
30 |
|
return true; |
|
31 |
+ |
} |
23 |
32 |
|
return false; |
24 |
33 |
|
|
25 |
34 |
|
} |