Package overit.geocall.mail
Class Rfc822
java.lang.Object
overit.geocall.mail.Rfc822
This class manages the rfc822 message
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static intstatic final Stringhttp://tools.ietf.org/html/rfc2311 The application/pkcs7-mime type is used to carry PKCS #7 objects of several types including envelopedData and signedData.static final Stringstatic final Stringstatic final StringThe "multipart/alternative" type is syntactically identical to "multipart/mixed", but the semantics are different.static final StringThe "mixed" subtype of "multipart" is intended for use when the body parts are independent and need to be bundled in a particular order.static final Stringhttp://tools.ietf.org/html/rfc2387 The Multipart/Related media type is intended for compound objects consisting of several inter-related body parts.static final Stringstatic final Stringhttp://tools.ietf.org/html/rfc1847 The multipart/signed content type specifies how to support authentication and integrity services via digital signature.static final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddAddresses(MimeMessage mm, Addresses aa, Message.RecipientType recipientType) protected static voidaddBodyPart(Body body, HashMap inlines, Part p) protected static voidaddHtmlBodyPart(Body body, HashMap inlines, Part p) protected static StringallOutTextExtract(Part p, Message m, String name) static AdaptiveMimeMessageprotected static voidformatPriority(MimeMessage mm, int priority) static voidstatic Messageparse(MimeMessage mm) static Messageparse(InputStream is) Creates a new instance of Rfc822 messageprotected static voidparseAttachment(Message m, Part p, String path, boolean linkattachment) protected static voidparseMultipart(Message m, Multipart mp, String path, boolean mixed, boolean alternative, boolean related) protected static voidparseMultipartReport(Message m, Multipart mp, String path) protected static voidprotected static voidparsePkcs7(Message m, Part p, String path, boolean mixed, boolean alternative, boolean related) protected static intprotected static Dateprotected static voidparseSigned(Message m, Part p, String path, boolean mixed, boolean alternative, boolean related) static voidDeprecated.static voidsend(Message m, SmtpServer ss) Deprecated.
-
Field Details
-
TYPE_TEXT
- See Also:
-
TYPE_HTML
- See Also:
-
TYPE_XML
- See Also:
-
MESSAGE_RFC822
- See Also:
-
TEXT_RFC822_HEADERS
- See Also:
-
MULTIPART_MIXED
The "mixed" subtype of "multipart" is intended for use when the body parts are independent and need to be bundled in a particular order. Any "multipart" subtypes that an implementation does not recognize must be treated as being of subtype "mixed".- See Also:
-
MULTIPART_ALTERNATIVE
The "multipart/alternative" type is syntactically identical to "multipart/mixed", but the semantics are different. In particular, each of the body parts is an "alternative" version of the same information. Systems should recognize that the content of the various parts are interchangeable. Systems should choose the "best" type based on the local environment and references, in some cases even through user interaction. As with "multipart/mixed", the order of body parts is significant. In this case, the alternatives appear in an order of increasing faithfulness to the original content. In general, the best choice is the LAST part of a type supported by the recipient system's local environment.- See Also:
-
MULTIPART_RELATED
http://tools.ietf.org/html/rfc2387 The Multipart/Related media type is intended for compound objects consisting of several inter-related body parts. For a Multipart/Related object, proper display cannot be achieved by individually displaying the constituent body parts. The content-type of the Multipart/Related object is specified by the type parameter. The "start" parameter, if given, points, via a content-ID, to the body part that contains the object root. The default root is the first body part within the Multipart/Related body. The relationships among the body parts of a compound object distinguishes it from other object types. These relationships are often represented by links internal to the object's components that reference the other components. Within a single operating environment the links are often file names, such links may be represented within a MIME message using content-IDs or the value of some other "Content-" headers.- See Also:
-
MULTIPART_SIGNED
http://tools.ietf.org/html/rfc1847 The multipart/signed content type specifies how to support authentication and integrity services via digital signature. The control information is carried in the second of the two required body parts. The multipart/encrypted content type specifies how to support confidentiality via encryption. The control information is carried in the first of the two required body parts. A three-step process is described for the origination and reception of the multipart/signed and multipart/encrypted contents. The details of the processing performed during each step is left to be specified by the security protocol being used.- See Also:
-
APPLICATION_PKCS7
http://tools.ietf.org/html/rfc2311 The application/pkcs7-mime type is used to carry PKCS #7 objects of several types including envelopedData and signedData. The details of constructing these entities is described in subsequent sections. This section describes the general characteristics of the application/pkcs7-mime type. This MIME type always carries a single PKCS #7 object. The PKCS #7 object must always be BER encoding of the ASN.1 syntax describing the object. The contentInfo field of the carried PKCS #7 object always contains a MIME entity that is prepared as described in section 3.1. The contentInfo field must never be empty.- See Also:
-
APPLICATION_X_PKCS7
- See Also:
-
MULTIPART_REPORT
- See Also:
-
_unnamedAttachmentCounter
protected static int _unnamedAttachmentCounter
-
-
Constructor Details
-
Rfc822
public Rfc822()
-
-
Method Details
-
parse
Creates a new instance of Rfc822 message- Parameters:
is- The InputStream- Returns:
- The message
- Throws:
EmailException- if an email exception is thrown
-
parse
- Throws:
MessagingExceptionIOException
-
parseReceivedHeaderDate
-
parsePart
protected static void parsePart(Message m, Part p, String path, boolean mixed, boolean alternative, boolean related) throws MessagingException, IOException - Throws:
MessagingExceptionIOException
-
allOutTextExtract
protected static String allOutTextExtract(Part p, Message m, String name) throws MessagingException, IOException - Throws:
MessagingExceptionIOException
-
parseMultipart
protected static void parseMultipart(Message m, Multipart mp, String path, boolean mixed, boolean alternative, boolean related) throws MessagingException, IOException - Throws:
MessagingExceptionIOException
-
parseMultipartReport
protected static void parseMultipartReport(Message m, Multipart mp, String path) throws MessagingException, IOException - Throws:
MessagingExceptionIOException
-
parseAttachment
protected static void parseAttachment(Message m, Part p, String path, boolean linkattachment) throws MessagingException, IOException - Throws:
MessagingExceptionIOException
-
parseSigned
protected static void parseSigned(Message m, Part p, String path, boolean mixed, boolean alternative, boolean related) throws MessagingException, IOException - Throws:
MessagingExceptionIOException
-
parsePkcs7
protected static void parsePkcs7(Message m, Part p, String path, boolean mixed, boolean alternative, boolean related) throws MessagingException, IOException - Throws:
MessagingExceptionIOException
-
parsePriority
-
formatPriority
-
addAddresses
protected static void addAddresses(MimeMessage mm, Addresses aa, Message.RecipientType recipientType) -
send
Deprecated.- Parameters:
m- useSmtpServer.send(overit.geocall.mail.Message)- Throws:
EmailException- useSmtpServer.send(overit.geocall.mail.Message)
-
send
Deprecated.- Parameters:
m- useSmtpServer.send(overit.geocall.mail.Message)ss- useSmtpServer.send(overit.geocall.mail.Message)- Throws:
EmailException- useSmtpServer.send(overit.geocall.mail.Message)
-
addBodyPart
- Throws:
MessagingException
-
addHtmlBodyPart
- Throws:
MessagingException
-
format
- Throws:
EmailException
-
main
- Throws:
Exception
-
SmtpServer.send(overit.geocall.mail.Message)