|
Enhydra-Oyster 2.1-7 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.oyster.smime.BaseSMIMEObject
org.enhydra.oyster.mail.PureMIME
PureMIME class is used for creating and sending pure (clear) MIME message (withouth any cryptographic posibilities). Initialization, creating and sending of pure (clear) MIME message has the same functionalities as S/MIME type of message.
Field Summary |
Fields inherited from class org.enhydra.oyster.smime.BaseSMIMEObject |
bodyPartArray, certArray, charsetEnc, contentPresence, externalMessagePresence, indicatorTo, message |
Fields inherited from interface org.enhydra.oyster.crypto.consts.KeyStoreConstants |
BKS, JKS, PKCS12, UBER |
Constructor Summary | |
PureMIME(javax.mail.internet.MimeMessage mimeMessage)
Construction of message with external prepared MimeMessage object. |
|
PureMIME(java.lang.String smtpHost,
java.lang.String fromAddress,
java.lang.String subject,
java.lang.String charset)
Initializes the JavaMail session for SMTP and the MimeMessage object for message which will be sent. |
|
PureMIME(java.lang.String smtpHost,
java.lang.String fromAddress,
java.lang.String subject,
java.lang.String content,
java.lang.String charset)
Initializes the JavaMail session for SMTP and the MimeMessage object for message which will be sent. |
Method Summary | |
void |
addRecipient(java.lang.String recipientAddress,
java.lang.String type)
Adds recipient email address and type. |
void |
composeMessage()
Creates and composes the message. |
Methods inherited from class org.enhydra.oyster.smime.BaseSMIMEObject |
addAttachment, addAttachment, addAttachment, addAttachment, addAttachment, addAttachment, addRecipient, addRecipient, addRecipient, getMimeMessage, initMimeMessage, reset, send, setCharsetEncoding, setContent, setContent, setContent, setContent, setContent, setContent, setContent, setContent, setContent, setContent, setReply |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PureMIME(java.lang.String smtpHost, java.lang.String fromAddress, java.lang.String subject, java.lang.String content, java.lang.String charset) throws SMIMEException
smtpHost
- name of SMTP host used for sending emailfromAddress
- email address of sender (FROM field in email header)subject
- subject of email (SUBJECT field in email header). This
argument can be null, but email message will be sent withouth SUBJECT.content
- text/plain content of email message. This argument can be
null, but later one of setContent() methods or one of addAttachment()
methods should be calledcharset
- character set for passed subject and content. The given
Unicode string will be charset-encoded using the specified charset. The
charset is also used to set the "charset" parameter. For example German
letters should be encoded by usage of 'ISO-8859-1' charset. If charset
parameter is null and subject or content contains non US-ASCII characters,
it will be encoded using the platform's default charset.
SMIMEException
- if smtpHost or fromAddress parameters are null.
Also, it can be caused by non SMIMEException which is MessagingException.public PureMIME(java.lang.String smtpHost, java.lang.String fromAddress, java.lang.String subject, java.lang.String charset) throws SMIMEException
smtpHost
- name of SMTP host used for sending emailfromAddress
- email address of sender (FROM field in email header)subject
- subject of email (SUBJECT field in email header). This
argument can be null, but email message will be sent withouth SUBJECT.charset
- character set for passed subject and content. The given
Unicode string will be charset-encoded using the specified charset. The
charset is also used to set the "charset" parameter. For example German
letters should be encoded by usage of 'ISO-8859-1' charset. If charset
parameter is null and subject or content contains non US-ASCII characters,
it will be encoded using the platform's default charset.
SMIMEException
- if smtpHost or fromAddress parameters are null.
Also, it can be caused by non SMIMEException which is MessagingException.public PureMIME(javax.mail.internet.MimeMessage mimeMessage) throws SMIMEException
mimeMessage
- external created MimeMessage object
SMIMEException
- if smtpHost or fromAddress parameter is null.
Also, it can be caused by non SMIMEException which is MessagingException.Method Detail |
public void addRecipient(java.lang.String recipientAddress, java.lang.String type) throws SMIMEException
recipientAddress
- email address of recipent (fields TO or CC or BCC
in email message header)type
- should be TO, CC or BCC.
SMIMEException
- if type of addressing of the messages is not TO, CC,
or BCC. Also it can be caused by non SMIMEException which is MessagingException.public void composeMessage() throws SMIMEException
SMIMEException
- if one of recipients is not declared as TO
recipient. Also, it can be caused by non SMIMEException which can be one of
the following: MessagingException, or IOException.
|
Enhydra-Oyster 2.1-7 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |