Add MailClient that uses Java Mail API to send emails. Use it instead of Mailgun client.

This commit is contained in:
Me Car 2016-01-22 21:40:08 +09:00
parent 9ebc2d5991
commit 9ca8342e34
6 changed files with 85 additions and 2 deletions

View file

@ -140,7 +140,7 @@ public class MageServerImpl implements MageServer {
}
String authToken = generateAuthToken();
activeAuthTokens.put(email, authToken);
if (!MailgunClient.sendMessage(email, "XMage Password Reset Auth Token",
if (!MailClient.sendMessage(email, "XMage Password Reset Auth Token",
"Use this auth token to reset your password: " + authToken + "\n" +
"It's valid until the next server restart.")) {
sendErrorMessageToClient(sessionId, "There was an error inside the server while emailing an auth token");