oracle.jsp.webutil.email
Class SendMailBean
java.lang.Object
|
+--oracle.jsp.webutil.email.SendMailBean
- public class SendMailBean
- extends java.lang.Object
Send an email using host or Javamail session information. Usage : instantiate the bean, set the host or session, sender and recipient, and optionally, the cc, bcc, subject, contentType and contentEncoding
Constructor Summary |
SendMailBean()
Create a new sendMailBean |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SendMailBean
public SendMailBean()
- Create a new sendMailBean
setHost
public void setHost(java.lang.String s)
getHost
public java.lang.String getHost()
setSession
public void setSession(java.lang.String s)
-
- Parameters:
s
- A string naming the mail session
getSession
public java.lang.String getSession()
setMailSession
public void setMailSession(javax.mail.Session session)
-
- Parameters:
session
- A valid mail session This method allows you to set an existing mail session.
getMailSession
public javax.mail.Session getMailSession()
setSender
public void setSender(java.lang.String s)
throws java.lang.Exception
-
- Parameters:
s
- A valid email address for the sender
java.lang.Exception
getSender
public java.lang.String getSender()
setRecipient
public void setRecipient(java.lang.String s)
throws java.lang.Exception
-
- Parameters:
s
- A valid email address for the recipient
java.lang.Exception
getRecipient
public java.lang.String getRecipient()
setCc
public void setCc(java.lang.String s)
-
- Parameters:
s
- A space or comma separated list email address to get message copies
getCc
public java.lang.String getCc()
setBcc
public void setBcc(java.lang.String s)
-
- Parameters:
s
- A space or comma separated list email address to for blind copy
getBcc
public java.lang.String getBcc()
setSubject
public void setSubject(java.lang.String s)
-
- Parameters:
s
- The text for the message subject
getSubject
public java.lang.String getSubject()
addClientAttachment
public void addClientAttachment(java.lang.String displayFileName)
throws java.lang.Exception
-
java.lang.Exception
setClientAttachment
public void setClientAttachment(java.lang.String displayFileName)
throws java.lang.Exception
-
java.lang.Exception
getClientAttachment
public java.lang.String getClientAttachment()
addServerAttachment
public void addServerAttachment(java.lang.String s1)
throws java.lang.Exception
-
java.lang.Exception
getServerAttachment
public java.lang.String getServerAttachment()
setServerAttachment
public void setServerAttachment(java.lang.String s)
throws java.lang.Exception
-
java.lang.Exception
addAttachmentDisplayName
public void addAttachmentDisplayName(java.lang.String s1)
throws java.lang.Exception
-
java.lang.Exception
setAttachmentDisplayName
public void setAttachmentDisplayName(java.lang.String s)
throws java.lang.Exception
-
java.lang.Exception
getFirstServerAttachment
public java.lang.String getFirstServerAttachment()
getNextServerAttachment
public java.lang.String getNextServerAttachment()
getAttachmentDisplayName
public java.lang.String getAttachmentDisplayName()
setContentType
public void setContentType(java.lang.String s)
-
- Parameters:
s
- The message's body content
getContentType
public java.lang.String getContentType()
setContentEncoding
public void setContentEncoding(java.lang.String s)
-
- Parameters:
s
- The message's body content
getContentEncoding
public java.lang.String getContentEncoding()
setContent
public void setContent(java.lang.String s)
-
- Parameters:
s
- The message's body content
getContent
public java.lang.String getContent()
sendMessage
public void sendMessage(javax.servlet.jsp.PageContext pageContext)
throws java.lang.Exception
-
- Parameters:
pageContext
- The page context in which a session string representing a valid mail session has been stored. Either the session string, mail session or host string must be available.
java.lang.Exception
sendMessage
public void sendMessage()
throws java.lang.Exception
-
java.lang.Exception
close
public void close()
setAttachmentPermission
public java.lang.String setAttachmentPermission(javax.servlet.ServletContext sc,
javax.servlet.http.HttpServletRequest req)
throws FileAccessException
- return the list of file names as a comma separated string not avaliable from the corresponding tag name does not include the base dir
-
FileAccessException
detectClientAttachment
public boolean detectClientAttachment()
detectServerAttachment
public boolean detectServerAttachment()
Copyright © YYYY, Oracle. All Rights Reserved.