com.jdroid.java.mail
Class GmailMailService
java.lang.Object
javax.mail.Authenticator
com.jdroid.java.mail.GmailMailService
- All Implemented Interfaces:
- MailService
public class GmailMailService
- extends javax.mail.Authenticator
- implements MailService
MailService that works fine with Gmail as smtp
|
Field Summary |
protected static org.slf4j.Logger |
LOGGER
|
| Methods inherited from class javax.mail.Authenticator |
getDefaultUserName, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingSite |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final org.slf4j.Logger LOGGER
GmailMailService
public GmailMailService()
getPasswordAuthentication
protected javax.mail.PasswordAuthentication getPasswordAuthentication()
- Overrides:
getPasswordAuthentication in class javax.mail.Authenticator
sendMail
public void sendMail(String subject,
String body,
String sender,
String recipient)
throws MailException
- Specified by:
sendMail in interface MailService
- Throws:
MailException- See Also:
MailService.sendMail(java.lang.String, java.lang.String, java.lang.String,
java.lang.String)
Copyright © 2014. All rights reserved.