org.benow.web.mail
Class MailServiceImpl

java.lang.Object
  extended by org.benow.web.mail.MailServiceImpl
All Implemented Interfaces:
org.benow.java.spec.Markup, org.benow.service.Service, MailService

public class MailServiceImpl
extends java.lang.Object
implements MailService


Nested Class Summary
 class MailServiceImpl.SupportInfo
           
 
Nested classes/interfaces inherited from interface org.benow.java.spec.Markup
org.benow.java.spec.Markup.ParamName, org.benow.java.spec.Markup.ReturnDescription
 
Field Summary
static org.benow.java.config.entry.StringConfigurationEntry CFG_SUPPORT_RECIPIENT
           
 
Constructor Summary
MailServiceImpl()
           
 
Method Summary
static void reportABug(java.lang.String msg, java.lang.Throwable e)
           
static void reportABug(java.lang.Throwable e)
           
 void reportBug(java.lang.String msg, java.lang.Throwable e)
          Report a bug via support email
 void sendEmail(java.lang.String subject, java.lang.String body)
          Sends email to email address of current user.
 void sendEmailToUser(java.lang.String userName, java.lang.String subject, java.lang.String body, java.lang.String captcha)
          Sends email to a user with a given name
 void sendEmailToUser(org.benow.security.user.User dest, java.lang.String subject, java.lang.String body, java.lang.String captcha)
           
 void sendSupportEmail(java.lang.String subject, java.lang.String details)
          Sends a support email to the support email from the current user
 void sendSupportEmail(java.lang.String fromName, java.lang.String fromEmail, java.lang.String subject, java.lang.String details)
          Sends a support email to the support email from the given sender
 void sendTypedSupportEmail(java.lang.String fromName, java.lang.String fromEmail, java.lang.String type, java.lang.String subject, java.lang.String body)
          Sends an email of a certain type to the support email from the given sender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CFG_SUPPORT_RECIPIENT

public static final org.benow.java.config.entry.StringConfigurationEntry CFG_SUPPORT_RECIPIENT
Constructor Detail

MailServiceImpl

public MailServiceImpl()
Method Detail

sendTypedSupportEmail

public void sendTypedSupportEmail(java.lang.String fromName,
                                  java.lang.String fromEmail,
                                  java.lang.String type,
                                  java.lang.String subject,
                                  java.lang.String body)
                           throws java.lang.Exception
Description copied from interface: MailService
Sends an email of a certain type to the support email from the given sender

Specified by:
sendTypedSupportEmail in interface MailService
Throws:
java.lang.Exception
RedirectException

sendSupportEmail

public void sendSupportEmail(java.lang.String subject,
                             java.lang.String details)
                      throws java.lang.Exception
Description copied from interface: MailService
Sends a support email to the support email from the current user

Specified by:
sendSupportEmail in interface MailService
Throws:
java.lang.Exception
RedirectException

sendSupportEmail

public void sendSupportEmail(java.lang.String fromName,
                             java.lang.String fromEmail,
                             java.lang.String subject,
                             java.lang.String details)
                      throws java.lang.Exception
Description copied from interface: MailService
Sends a support email to the support email from the given sender

Specified by:
sendSupportEmail in interface MailService
Throws:
java.lang.Exception
RedirectException

sendEmail

public void sendEmail(java.lang.String subject,
                      java.lang.String body)
               throws javax.mail.MessagingException
Description copied from interface: MailService
Sends email to email address of current user. Throws MessagingException if the current user has null email.

Specified by:
sendEmail in interface MailService
Throws:
javax.mail.MessagingException

sendEmailToUser

public void sendEmailToUser(java.lang.String userName,
                            java.lang.String subject,
                            java.lang.String body,
                            java.lang.String captcha)
                     throws InvalidCaptchaException,
                            javax.mail.MessagingException
Description copied from interface: MailService
Sends email to a user with a given name

Specified by:
sendEmailToUser in interface MailService
Throws:
InvalidCaptchaException
javax.mail.MessagingException

sendEmailToUser

public void sendEmailToUser(org.benow.security.user.User dest,
                            java.lang.String subject,
                            java.lang.String body,
                            java.lang.String captcha)
                     throws InvalidCaptchaException,
                            javax.mail.MessagingException
Specified by:
sendEmailToUser in interface MailService
Throws:
InvalidCaptchaException
javax.mail.MessagingException

reportBug

public void reportBug(java.lang.String msg,
                      java.lang.Throwable e)
               throws java.lang.Exception
Description copied from interface: MailService
Report a bug via support email

Specified by:
reportBug in interface MailService
Throws:
java.lang.Exception

reportABug

public static void reportABug(java.lang.String msg,
                              java.lang.Throwable e)
                       throws java.lang.Exception
Throws:
java.lang.Exception

reportABug

public static void reportABug(java.lang.Throwable e)
                       throws java.lang.Exception
Throws:
java.lang.Exception