org.wso2.carbon.email.verification.util
Class EmailSender

java.lang.Object
  extended by java.lang.Thread
      extended by org.wso2.carbon.email.verification.util.EmailSender
All Implemented Interfaces:
Runnable

public class EmailSender
extends Thread

The thread responsible for sending emails.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String CONF_STRING
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EmailSender(EmailVerifierConfig config, String emailAddr, String secretKey)
           
EmailSender(EmailVerifierConfig config, String emailAddr, String secretKey, String tenantDomain)
           
EmailSender(EmailVerifierConfig config, String emailAddr, String secretKey, String tenantDomain, Map<String,String> userParameters)
           
 
Method Summary
static String replacePlaceHolders(String text, Map<String,String> userParameters)
          Replace the {user-parameters} in the config file with the respective values
 void run()
           
 void sendEmail()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONF_STRING

public static final String CONF_STRING
See Also:
Constant Field Values
Constructor Detail

EmailSender

public EmailSender(EmailVerifierConfig config,
                   String emailAddr,
                   String secretKey)

EmailSender

public EmailSender(EmailVerifierConfig config,
                   String emailAddr,
                   String secretKey,
                   String tenantDomain)

EmailSender

public EmailSender(EmailVerifierConfig config,
                   String emailAddr,
                   String secretKey,
                   String tenantDomain,
                   Map<String,String> userParameters)
Method Detail

sendEmail

public void sendEmail()

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

replacePlaceHolders

public static String replacePlaceHolders(String text,
                                         Map<String,String> userParameters)
Replace the {user-parameters} in the config file with the respective values

Parameters:
text - the initial text
userParameters - mapping of the key and its value
Returns:
the final text to be sent in the email


Copyright © 2015 WSO2. All rights reserved.