com.jdroid.java.mail
Class GmailMailService

java.lang.Object
  extended by javax.mail.Authenticator
      extended by 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
           
 
Constructor Summary
GmailMailService()
           
 
Method Summary
protected  javax.mail.PasswordAuthentication getPasswordAuthentication()
           
 void sendMail(String subject, String body, String sender, String recipient)
           
 
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
 

Field Detail

LOGGER

protected static final org.slf4j.Logger LOGGER
Constructor Detail

GmailMailService

public GmailMailService()
Method Detail

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.