Skip navigation links


com.essbase.eas.essbase.server
Class EmailPrimitives

java.lang.Object
  extended by com.essbase.eas.essbase.server.EmailPrimitives


public class EmailPrimitives
extends java.lang.Object

TheEmailPrimitives class presents functions used to email strings and files using the JavaMail package. This class contains methods for sending strings as file attachments and files as attachments note: this will need some work with encodings


Method Summary
static boolean sendFileAttachments(java.lang.String toName, java.lang.String ccName, java.lang.String bccName, java.lang.String subject, java.lang.String fromName, java.lang.String fromEmail, java.lang.String smtpHost, java.lang.String msgText, java.lang.String description, java.io.File[] files)
          send files as attachments
static boolean sendStringAsFileAttachment(java.lang.String toName, java.lang.String ccName, java.lang.String bccName, java.lang.String subject, java.lang.String fromName, java.lang.String fromEmail, java.lang.String smtpHost, java.lang.String msgText, java.lang.String description, javax.activation.DataSource ds)
           
static boolean sendStringAsFileAttachment(java.lang.String toName, java.lang.String ccName, java.lang.String bccName, java.lang.String subject, java.lang.String fromName, java.lang.String fromEmail, java.lang.String smtpHost, java.lang.String msgText, java.lang.String description, java.lang.String fileName, java.lang.String content, java.lang.String type)
           
static boolean sendStringsAsZipFile(java.lang.String toName, java.lang.String ccName, java.lang.String bccName, java.lang.String subject, java.lang.String fromName, java.lang.String fromEmail, java.lang.String smtpHost, java.lang.String msgText, java.lang.String description, java.lang.String[] strings, java.lang.String[] fileNames, java.lang.String zipName)
          Sends a string array as a single zip file attachment.
static boolean sendZipFileAttachment(java.lang.String toName, java.lang.String ccName, java.lang.String bccName, java.lang.String subject, java.lang.String fromName, java.lang.String fromEmail, java.lang.String smtpHost, java.lang.String msgText, java.lang.String description, java.io.File[] files)
          Send an array of files as a single zip file attachment instead of as individual files

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

sendStringAsFileAttachment

public static boolean sendStringAsFileAttachment(java.lang.String toName,
                                                 java.lang.String ccName,
                                                 java.lang.String bccName,
                                                 java.lang.String subject,
                                                 java.lang.String fromName,
                                                 java.lang.String fromEmail,
                                                 java.lang.String smtpHost,
                                                 java.lang.String msgText,
                                                 java.lang.String description,
                                                 java.lang.String fileName,
                                                 java.lang.String content,
                                                 java.lang.String type)
                                          throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

sendStringAsFileAttachment

public static boolean sendStringAsFileAttachment(java.lang.String toName,
                                                 java.lang.String ccName,
                                                 java.lang.String bccName,
                                                 java.lang.String subject,
                                                 java.lang.String fromName,
                                                 java.lang.String fromEmail,
                                                 java.lang.String smtpHost,
                                                 java.lang.String msgText,
                                                 java.lang.String description,
                                                 javax.activation.DataSource ds)
                                          throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

sendStringsAsZipFile

public static boolean sendStringsAsZipFile(java.lang.String toName,
                                           java.lang.String ccName,
                                           java.lang.String bccName,
                                           java.lang.String subject,
                                           java.lang.String fromName,
                                           java.lang.String fromEmail,
                                           java.lang.String smtpHost,
                                           java.lang.String msgText,
                                           java.lang.String description,
                                           java.lang.String[] strings,
                                           java.lang.String[] fileNames,
                                           java.lang.String zipName)
                                    throws javax.mail.MessagingException
Sends a string array as a single zip file attachment.
Parameters:
toName - the address(es) to send the document to
ccName - the address(es) to CC the document to
bccName - the address(es) to BCC the document to
subject - the subject of the message
fromName - the address of the sender of the document
fromEmail - the email address of the sender
smtpHost - the smtpHost to use to send the message
msgText - text part of the message
description - the description of the document being sent
fileName - filename to be used as an attachment
content - the content of the attachment
type - the type of the attachment
zipName - the name to use for the zip archive
Returns:
true if the message is sent successfully
Throws:
MessagingException - when any error occurs during constructing or sending the message
javax.mail.MessagingException
See Also:
javax.mail.*, javax.mail.internet.*

sendZipFileAttachment

public static boolean sendZipFileAttachment(java.lang.String toName,
                                            java.lang.String ccName,
                                            java.lang.String bccName,
                                            java.lang.String subject,
                                            java.lang.String fromName,
                                            java.lang.String fromEmail,
                                            java.lang.String smtpHost,
                                            java.lang.String msgText,
                                            java.lang.String description,
                                            java.io.File[] files)
                                     throws javax.mail.MessagingException
Send an array of files as a single zip file attachment instead of as individual files
Parameters:
toName - the address(es) to send the document to
ccName - the address(es) to CC the document to
bccName - the address(es) to BCC the document to
subject - the subject of the message
fromName - the address of the sender of the document
fromEmail - the email address of the sender
smtpHost - the smtpHost to use to send the message
msgText - text part of the message
description - the description of the document being sent
files - array of File objects
Throws:
MessagingException - if any errors occur during construction or sending of the message
javax.mail.MessagingException
See Also:
File

sendFileAttachments

public static boolean sendFileAttachments(java.lang.String toName,
                                          java.lang.String ccName,
                                          java.lang.String bccName,
                                          java.lang.String subject,
                                          java.lang.String fromName,
                                          java.lang.String fromEmail,
                                          java.lang.String smtpHost,
                                          java.lang.String msgText,
                                          java.lang.String description,
                                          java.io.File[] files)
                                   throws javax.mail.MessagingException
send files as attachments
Parameters:
toName - the address(es) to send the document to
ccName - the address(es) to CC the document to
bccName - the address(es) to BCC the document to
subject - the subject of the message
fromName - the address of the sender of the document
fromEmail - the email address of the sender
smtpHost - the smtpHost to use to send the message
msgText - text part of the message
description - the description of the document being sent
files - array of File objects
Throws:
MessagingException - if any errors occur during construction or sending of the message
javax.mail.MessagingException
See Also:
File

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.