openfuture.bugbase.actions
Class SendMailAction

java.lang.Object
  |
  +--org.apache.struts.action.Action
        |
        +--openfuture.bugbase.actions.BugBaseAction
              |
              +--openfuture.bugbase.actions.SendMailAction
All Implemented Interfaces:
JspConstants

public class SendMailAction
extends BugBaseAction
implements JspConstants

Action bean for sending an email.

Created: Tue Mar 06 20:39:00 2001

Version:
$Revision: 1.7 $
Author:
Wolfgang Reissenberger

Fields inherited from class org.apache.struts.action.Action
DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGES_KEY, MULTIPART_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY
 
Fields inherited from interface openfuture.bugbase.model.JspConstants
ATTACHMENT_DIR, ATTACHMENT_URL, BUG_REPORT, BUGBASE_SERVLET, LOCALES, LOGIN_MANAGER, MAILSERVER, MD_PROVIDER, NEXT_PAGE, PACKAGES, PROJECT, QUERY, QUERYSTRING, REPORTS, RESULT, SENDMAIL, SERVLET_CLIENT, SERVLETPATH, USER, USER_ID
 
Constructor Summary
SendMailAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Send an email from Bug Base.
static void sendmail(java.lang.String mailServer, java.lang.String fromAddress, java.lang.String toAddress, java.lang.String subject, java.lang.String content)
          Send an email via an SMTP mail server to a single recipient.
 
Methods inherited from class openfuture.bugbase.actions.BugBaseAction
checkLogin, findNextPage, getClient, getLoginManager, getMasterDataProvider, getProject, getQueryString, getServletPath, getUser, initialize, saveOriginalRequest, setProject, setUser
 
Methods inherited from class org.apache.struts.action.Action
generateToken, getLocale, getResources, getServlet, isCancelled, isTokenValid, perform, perform, perform, resetToken, saveErrors, saveToken, setLocale, setServlet, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendMailAction

public SendMailAction()
Method Detail

perform

public org.apache.struts.action.ActionForward perform(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws java.io.IOException,
                                                      javax.servlet.ServletException
Send an email from Bug Base. The following forwards are generated:
Overrides:
perform in class org.apache.struts.action.Action
Parameters:
mapping - The ActionMapping used to select this instance
form - The optional ActionForm bean for this request (if any)
request - The HTTP request we are processing
response - The HTTP response we are creating
Returns:
an ActionForward value
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs

sendmail

public static void sendmail(java.lang.String mailServer,
                            java.lang.String fromAddress,
                            java.lang.String toAddress,
                            java.lang.String subject,
                            java.lang.String content)
                     throws javax.mail.internet.AddressException,
                            javax.mail.MessagingException
Send an email via an SMTP mail server to a single recipient.
Parameters:
mailServer - SMTP mail server
fromAddress - sender address
toAddress - recipient
subject - mail subject
content - the mail content
Throws:
javax.mail.internet.AddressException - if an error occurs
javax.mail.MessagingException - if an error occurs


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.