forked from External/mage
Add some password validation.
This commit is contained in:
parent
8dd1e21dba
commit
f99660a451
6 changed files with 50 additions and 19 deletions
|
|
@ -63,6 +63,10 @@ public class GmailClient {
|
|||
}
|
||||
|
||||
public static boolean sendMessage(String email, String subject, String text) {
|
||||
if (email.length() == 0) {
|
||||
logger.info("Email is not sent because the address is empty");
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
Gmail gmail = new Builder(httpTransport, JSON_FACTORY, credential).setApplicationName("XMage Server").build();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue