Uses of Class
jakarta.mail.MessagingException
-
Packages that use MessagingException Package Description com.sun.mail.imap An IMAP protocol provider for the Jakarta Mail API that provides access to an IMAP message store.com.sun.mail.pop3 A POP3 protocol provider for the Jakarta Mail API that provides access to a POP3 message store.com.sun.mail.smtp An SMTP protocol provider for the Jakarta Mail API that provides access to an SMTP server.com.sun.mail.util Utility classes for use with the Jakarta Mail API.jakarta.mail The Jakarta Mail API provides classes that model a mail system.jakarta.mail.internet Classes specific to Internet mail systems.jakarta.mail.search Message search terms for the Jakarta Mail API. -
-
Uses of MessagingException in com.sun.mail.imap
Subclasses of MessagingException in com.sun.mail.imap Modifier and Type Class Description classReferralExceptionA special kind of AuthenticationFailedException that indicates that the reason for the failure was an IMAP REFERRAL in the response code.Methods in com.sun.mail.imap that throw MessagingException Modifier and Type Method Description voidIMAPFolder. addACL(ACL acl)Add an access control list entry to the access control list for this folder.voidIMAPMessage. addFrom(Address[] addresses)voidIMAPBodyPart. addHeader(String name, String value)voidIMAPMessage. addHeader(String name, String value)voidIMAPBodyPart. addHeaderLine(String line)voidIMAPMessage. addHeaderLine(String line)Message[]IMAPFolder. addMessages(Message[] msgs)Append the given messages into this folder.voidIMAPMessage. addRecipients(Message.RecipientType type, Address[] addresses)voidIMAPFolder. addRights(ACL acl)Add the rights specified in the ACL to the entry for the identifier specified in the ACL.voidDefaultFolder. appendMessages(Message[] msgs)voidIMAPFolder. appendMessages(Message[] msgs)Append the given messages into this folder.AppendUID[]IMAPFolder. appendUIDMessages(Message[] msgs)Append the given messages into this folder.protected voidIMAPFolder. checkExists()protected voidIMAPFolder. checkRange(int msgno)voidIMAPFolder. close(boolean expunge)Close this folder.voidIMAPStore. close()Close this Store.voidIMAPFolder. copyMessages(Message[] msgs, Folder folder)Copy the specified messages from this folder, to the specified destination.AppendUID[]IMAPFolder. copyUIDMessages(Message[] msgs, Folder folder)Copy the specified messages from this folder, to the specified destination.booleanIMAPFolder. create(int type)Create this folder, with the specified type.booleanDefaultFolder. delete(boolean recurse)booleanIMAPFolder. delete(boolean recurse)Delete this folder.ObjectIMAPFolder. doCommand(IMAPFolder.ProtocolCommand cmd)Execute a user-supplied IMAP command.ObjectIMAPFolder. doCommandIgnoreFailure(IMAPFolder.ProtocolCommand cmd)ObjectIMAPFolder. doOptionalCommand(String err, IMAPFolder.ProtocolCommand cmd)booleanIMAPFolder. exists()Check whether this folder really exists on the server.Message[]DefaultFolder. expunge()Message[]IMAPFolder. expunge()Expunge all messages marked as DELETED.Message[]IMAPFolder. expunge(Message[] msgs)Expunge the indicated messages, which must have been marked as DELETED.voidIMAPFolder. fetch(Message[] msgs, FetchProfile fp)Prefetch attributes, based on the given FetchProfile.protected ObjectIMAPMessage. fetchItem(FetchItem fitem)Fetch an individual item for the current message.voidIMAPFolder. forceClose()Close this folder without waiting for the server.ACL[]IMAPFolder. getACL()Get the access control list entries for this folder.Enumeration<String>IMAPBodyPart. getAllHeaderLines()Enumeration<String>IMAPMessage. getAllHeaderLines()Get all header-lines.Enumeration<Header>IMAPBodyPart. getAllHeaders()Enumeration<Header>IMAPMessage. getAllHeaders()Get all headers.String[]IMAPFolder. getAttributes()Get the attributes that the IMAP server returns with the LIST response.BodyPartIMAPMultipartDataSource. getBodyPart(int index)StringIMAPBodyPart. getContentID()StringIMAPMessage. getContentID()Get the Content-ID.String[]IMAPMessage. getContentLanguage()Get the content language.StringIMAPBodyPart. getContentMD5()StringIMAPMessage. getContentMD5()Get the Content-MD5.protected InputStreamIMAPBodyPart. getContentStream()protected InputStreamIMAPMessage. getContentStream()Get all the bytes for this message.StringIMAPBodyPart. getContentType()StringIMAPMessage. getContentType()Get the Content-Type.jakarta.activation.DataHandlerIMAPBodyPart. getDataHandler()jakarta.activation.DataHandlerIMAPMessage. getDataHandler()Get the DataHandler object for this message.FolderIMAPStore. getDefaultFolder()Get the default folder, representing the root of this user's namespace.intIMAPFolder. getDeletedMessageCount()Get the deleted message count.StringIMAPBodyPart. getDescription()StringIMAPMessage. getDescription()Get the decoded Content-Description.StringIMAPBodyPart. getDisposition()StringIMAPMessage. getDisposition()Get the Content-Disposition.StringIMAPBodyPart. getEncoding()StringIMAPMessage. getEncoding()Get the Content-Transfer-Encoding.StringIMAPBodyPart. getFileName()StringIMAPMessage. getFileName()Get the "filename" Disposition parameter.FlagsIMAPMessage. getFlags()Get the Flags for this message.FolderDefaultFolder. getFolder(String name)FolderIMAPFolder. getFolder(String name)Get the named subfolder.FolderIMAPStore. getFolder(URLName url)Get named folder.FolderIMAPStore. getFolder(String name)Get named folder.Address[]IMAPMessage. getFrom()Get the "From" attribute.String[]IMAPBodyPart. getHeader(String name)String[]IMAPMessage. getHeader(String name)Get the named header.StringIMAPMessage. getHeader(String name, String delimiter)Get the named header.longIMAPFolder. getHighestModSeq()Returns the HIGHESTMODSEQ for this folder.StringIMAPMessage. getInReplyTo()Get the In-Reply-To header.ObjectIMAPMessage. getItem(FetchItem fitem)Return the data associated with the FetchItem.intIMAPBodyPart. getLineCount()intIMAPMessage. getLineCount()Get the total number of lines.Enumeration<String>IMAPBodyPart. getMatchingHeaderLines(String[] names)Enumeration<String>IMAPMessage. getMatchingHeaderLines(String[] names)Get all matching header-lines.Enumeration<Header>IMAPBodyPart. getMatchingHeaders(String[] names)Enumeration<Header>IMAPMessage. getMatchingHeaders(String[] names)Get matching headers.MessageIMAPFolder. getMessage(int msgnum)Get the specified message.MessageIMAPFolder. getMessageByUID(long uid)Get the Message corresponding to the given UID.intIMAPFolder. getMessageCount()Get the total message count.StringIMAPMessage. getMessageID()Get the Message-ID.Message[]IMAPFolder. getMessages()Get all Message objects from this Folder.Message[]IMAPFolder. getMessagesByUID(long[] uids)Get the Messages specified by the given array.Message[]IMAPFolder. getMessagesByUID(long start, long end)Get the Messages specified by the given range.Message[]IMAPFolder. getMessagesByUIDChangedSince(long start, long end, long modseq)Get the messages that have been changed since the given MODSEQ value.InputStreamIMAPBodyPart. getMimeStream()Return the MIME format stream corresponding to this message part.InputStreamIMAPMessage. getMimeStream()Return the MIME format stream corresponding to this message.longIMAPMessage. getModSeq()Return the modification sequence number (MODSEQ) for this message.intIMAPFolder. getNewMessageCount()Get the new message count.Enumeration<String>IMAPBodyPart. getNonMatchingHeaderLines(String[] names)Enumeration<String>IMAPMessage. getNonMatchingHeaderLines(String[] names)Get all non-matching headerlines.Enumeration<Header>IMAPBodyPart. getNonMatchingHeaders(String[] names)Enumeration<Header>IMAPMessage. getNonMatchingHeaders(String[] names)Get non-matching headers.FolderIMAPFolder. getParent()Get this folder's parent.Folder[]IMAPStore. getPersonalNamespaces()Using the IMAP NAMESPACE command (RFC 2342), return a set of folders representing the Personal namespaces.Quota[]IMAPFolder. getQuota()Get the quotas for the quotaroot associated with this folder.Quota[]IMAPStore. getQuota(String root)Get the quotas for the named quota root.DateIMAPMessage. getReceivedDate()Get the received date (INTERNALDATE).Address[]IMAPMessage. getRecipients(Message.RecipientType type)Get the desired Recipient type.Address[]IMAPMessage. getReplyTo()Get the ReplyTo addresses.AddressIMAPMessage. getSender()Get the "Sender" attribute.DateIMAPMessage. getSentDate()Get the SentDate.charIMAPFolder. getSeparator()Get the separator character.Folder[]IMAPStore. getSharedNamespaces()Using the IMAP NAMESPACE command (RFC 2342), return a set of folders representing the Shared namespaces.intIMAPBodyPart. getSize()intIMAPMessage. getSize()Get the message size.intIMAPNestedMessage. getSize()longIMAPMessage. getSizeLong()Get the message size as a long.Message[]IMAPFolder. getSortedMessages(SortTerm[] term)Sort the messages in the folder according to the sort criteria.Message[]IMAPFolder. getSortedMessages(SortTerm[] term, SearchTerm sterm)Sort the messages in the folder according to the sort criteria.longIMAPFolder. getStatusItem(String item)Use the IMAP STATUS command to get the indicated item.StringIMAPMessage. getSubject()Get the decoded subject.intIMAPFolder. getType()Get the type of this folder.longIMAPFolder. getUID(Message message)Get the UID for the specified message.longIMAPFolder. getUIDNext()Returns the predicted UID that will be assigned to the next message that is appended to this folder.booleanIMAPFolder. getUIDNotSticky()Servers that support the UIDPLUS extension (RFC 4315) may indicate that this folder does not support persistent UIDs; that is, UIDVALIDITY will be different each time the folder is opened.longIMAPFolder. getUIDValidity()Returns the UIDValidity for this folder.intIMAPFolder. getUnreadMessageCount()Get the unread message count.Folder[]IMAPStore. getUserNamespaces(String user)Using the IMAP NAMESPACE command (RFC 2342), return a set of folders representing the User's namespaces.protected booleanIMAPMessage. handleFetchItem(Item item, String[] hdrs, boolean allHeaders)Apply the data in the FETCH item to this message.booleanIMAPStore. hasCapability(String capability)Return true if the specified capability string is in the list of capabilities the server announced.booleanDefaultFolder. hasNewMessages()booleanIMAPFolder. hasNewMessages()Check whether this folder has new messages.Map<String,String>IMAPFolder. id(Map<String,String> clientParams)Send the IMAP ID command (if supported by the server) and return the result from the server.Map<String,String>IMAPStore. id(Map<String,String> clientParams)Send the IMAP ID command (if supported by the server) and return the result from the server.voidIMAPFolder. idle()Use the IMAP IDLE command (see RFC 2177), if supported by the server, to enter idle mode so that the server can send unsolicited notifications of new messages arriving, etc.voidIMAPFolder. idle(boolean once)LikeIMAPFolder.idle(), but ifonceis true, abort the IDLE command after the first notification, to allow the caller to process any notification synchronously.voidIMAPStore. idle()Use the IMAP IDLE command (see RFC 2177), if supported by the server, to enter idle mode so that the server can send unsolicited notifications without the need for the client to constantly poll the server.booleanIMAPMessage. isSet(Flags.Flag flag)Test if the given Flags are set in this message.Folder[]DefaultFolder. list(String pattern)Folder[]IMAPFolder. list(String pattern)List all subfolders matching the specified pattern.Rights[]IMAPFolder. listRights(String name)Get all the rights that may be allowed to the given identifier.Folder[]DefaultFolder. listSubscribed(String pattern)Folder[]IMAPFolder. listSubscribed(String pattern)List all subscribed subfolders matching the specified pattern.voidIMAPFolder. moveMessages(Message[] msgs, Folder folder)Move the specified messages from this folder, to the specified destination.AppendUID[]IMAPFolder. moveUIDMessages(Message[] msgs, Folder folder)Move the specified messages from this folder, to the specified destination.RightsIMAPFolder. myRights()Get the rights allowed to the currently authenticated user.voidIMAPFolder. open(int mode)Open this folder in the given mode.List<MailEvent>IMAPFolder. open(int mode, ResyncData rd)Open this folder in the given mode, with the given resynchronization data.protected booleanIMAPStore. protocolConnect(String host, int pport, String user, String password)Implementation of protocolConnect().voidIMAPFolder. removeACL(String name)Remove any access control list entry for the given identifier from the access control list for this folder.voidIMAPBodyPart. removeHeader(String name)voidIMAPMessage. removeHeader(String name)voidIMAPFolder. removeRights(ACL acl)Remove the rights specified in the ACL from the entry for the identifier specified in the ACL.booleanDefaultFolder. renameTo(Folder f)booleanIMAPFolder. renameTo(Folder f)Rename this folder.Message[]IMAPFolder. search(SearchTerm term)Search whole folder for messages matching the given term.Message[]IMAPFolder. search(SearchTerm term, Message[] msgs)Search the folder for messages matching the given term.voidIMAPBodyPart. setContent(Multipart mp)voidIMAPBodyPart. setContent(Object o, String type)voidIMAPMessage. setContentID(String cid)voidIMAPMessage. setContentLanguage(String[] languages)voidIMAPBodyPart. setContentMD5(String md5)voidIMAPMessage. setContentMD5(String md5)voidIMAPBodyPart. setDataHandler(jakarta.activation.DataHandler content)voidIMAPMessage. setDataHandler(jakarta.activation.DataHandler content)voidIMAPBodyPart. setDescription(String description, String charset)voidIMAPMessage. setDescription(String description, String charset)voidIMAPBodyPart. setDisposition(String disposition)voidIMAPMessage. setDisposition(String disposition)voidIMAPBodyPart. setFileName(String filename)voidIMAPMessage. setFileName(String filename)voidIMAPFolder. setFlags(int[] msgnums, Flags flag, boolean value)Set the specified flags for the given array of message numbers.voidIMAPFolder. setFlags(int start, int end, Flags flag, boolean value)Set the specified flags for the given range of message numbers.voidIMAPFolder. setFlags(Message[] msgs, Flags flag, boolean value)Set the specified flags for the given array of messages.voidIMAPMessage. setFlags(Flags flag, boolean set)Set/Unset the given flags in this message.voidIMAPNestedMessage. setFlags(Flags flag, boolean set)voidIMAPMessage. setFrom(Address address)voidIMAPBodyPart. setHeader(String name, String value)voidIMAPMessage. setHeader(String name, String value)voidIMAPFolder. setQuota(Quota quota)Set the quotas for the quotaroot specified in the quota argument.voidIMAPStore. setQuota(Quota quota)Set the quotas for the quota root specified in the quota argument.voidIMAPMessage. setRecipients(Message.RecipientType type, Address[] addresses)voidIMAPMessage. setReplyTo(Address[] addresses)voidIMAPMessage. setSender(Address address)voidIMAPMessage. setSentDate(Date d)voidIMAPMessage. setSubject(String subject, String charset)voidIMAPFolder. setSubscribed(boolean subscribe)Subscribe/Unsubscribe this folder.voidIdleManager. watch(Folder folder)Watch the Folder for new messages and other events using the IMAP IDLE command.voidIMAPMessage. writeTo(OutputStream os)Write out the bytes into the given OutputStream. -
Uses of MessagingException in com.sun.mail.pop3
Methods in com.sun.mail.pop3 that throw MessagingException Modifier and Type Method Description voidPOP3Message. addHeader(String name, String value)Add this value to the existing values for this header_name.voidPOP3Message. addHeaderLine(String line)Add a raw RFC822 header-line.voidDefaultFolder. appendMessages(Message[] msgs)voidPOP3Folder. appendMessages(Message[] msgs)Always throwsMethodNotSupportedExceptionbecause the POP3 protocol doesn't support appending messages.Map<String,String>POP3Store. capabilities()Return a Map of the capabilities the server provided, as per RFC 2449.voidDefaultFolder. close(boolean expunge)voidPOP3Folder. close(boolean expunge)voidPOP3Store. close()booleanDefaultFolder. create(int type)booleanPOP3Folder. create(int type)Always returnsfalse; the POP3 protocol doesn't support creating folders.protected POP3MessagePOP3Folder. createMessage(Folder f, int msgno)booleanDefaultFolder. delete(boolean recurse)booleanPOP3Folder. delete(boolean recurse)Always throwsMethodNotSupportedExceptionbecause the POP3 protocol doesn't allow the INBOX to be deleted.Message[]DefaultFolder. expunge()Message[]POP3Folder. expunge()Always throwsMethodNotSupportedExceptionbecause the POP3 protocol doesn't support expunging messages without closing the folder; call theclosemethod with theexpungeargument set totrueinstead.voidPOP3Folder. fetch(Message[] msgs, FetchProfile fp)Prefetch information about POP3 messages.Enumeration<String>POP3Message. getAllHeaderLines()Get all header lines as an Enumeration of Strings.Enumeration<Header>POP3Message. getAllHeaders()Return all the headers from this Message as an enumeration of Header objects.protected InputStreamPOP3Message. getContentStream()Produce the raw bytes of the content.FolderPOP3Store. getDefaultFolder()FolderDefaultFolder. getFolder(String name)FolderPOP3Folder. getFolder(String name)Always throwsMessagingExceptionbecause no POP3 folders can contain subfolders.FolderPOP3Store. getFolder(URLName url)FolderPOP3Store. getFolder(String name)Only the name "INBOX" is supported.String[]POP3Message. getHeader(String name)Get all the headers for this header_name.StringPOP3Message. getHeader(String name, String delimiter)Get all the headers for this header name, returned as a single String, with headers separated by the delimiter.protected FolderDefaultFolder. getInbox()Enumeration<String>POP3Message. getMatchingHeaderLines(String[] names)Get matching header lines as an Enumeration of Strings.Enumeration<Header>POP3Message. getMatchingHeaders(String[] names)Return matching headers from this Message as an Enumeration of Header objects.MessageDefaultFolder. getMessage(int msgno)MessagePOP3Folder. getMessage(int msgno)intDefaultFolder. getMessageCount()intPOP3Folder. getMessageCount()Will not change while the folder is open because the POP3 protocol doesn't support notification of new messages arriving in open folders.InputStreamPOP3Message. getMimeStream()Return the MIME format stream corresponding to this message part.Enumeration<String>POP3Message. getNonMatchingHeaderLines(String[] names)Get non-matching header lines as an Enumeration of Strings.Enumeration<Header>POP3Message. getNonMatchingHeaders(String[] names)Return non-matching headers from this Message as an Enumeration of Header objects.intPOP3Folder. getSize()Return the size of this folder, as was returned by the POP3 STAT command when this folder was opened.intPOP3Message. getSize()Return the size of the content of this message in bytes.int[]POP3Folder. getSizes()Return the sizes of all messages in this folder, as returned by the POP3 LIST command.StringPOP3Folder. getUID(Message msg)Return the unique ID string for this message, or null if not available.booleanDefaultFolder. hasNewMessages()booleanPOP3Folder. hasNewMessages()Always returnsfalse; the POP3 protocol provides no way to determine when a new message arrives.Folder[]DefaultFolder. list(String pattern)Folder[]POP3Folder. list(String pattern)Always throwsMessagingExceptionbecause no POP3 folders can contain subfolders.InputStreamPOP3Folder. listCommand()Return the raw results of the POP3 LIST command with no arguments.voidDefaultFolder. open(int mode)voidPOP3Folder. open(int mode)ThrowsFolderNotFoundExceptionunless this folder is named "INBOX".protected booleanPOP3Store. protocolConnect(String host, int portNum, String user, String passwd)voidPOP3Message. removeHeader(String name)Remove all headers with this name.booleanDefaultFolder. renameTo(Folder f)booleanPOP3Folder. renameTo(Folder f)Always throwsMethodNotSupportedExceptionbecause the POP3 protocol doesn't support multiple folders.voidPOP3Message. saveChanges()POP3 message can't be changed.voidPOP3Message. setFlags(Flags newFlags, boolean set)Set the specified flags on this message to the specified value.voidPOP3Message. setHeader(String name, String value)Set the value for this header_name.InputStreamPOP3Message. top(int n)Fetch the header of the message and the firstnlines of the raw content of the message.voidPOP3Message. writeTo(OutputStream os, String[] ignoreList)Output the message as an RFC 822 format stream, without specified headers.Constructors in com.sun.mail.pop3 that throw MessagingException Constructor Description POP3Message(Folder folder, int msgno) -
Uses of MessagingException in com.sun.mail.smtp
Subclasses of MessagingException in com.sun.mail.smtp Modifier and Type Class Description classSMTPAddressFailedExceptionThis exception is thrown when the message cannot be sent.classSMTPAddressSucceededExceptionThis exception is chained off a SendFailedException when themail.smtp.reportsuccessproperty is true.classSMTPSenderFailedExceptionThis exception is thrown when the message cannot be sent.classSMTPSendFailedExceptionThis exception is thrown when the message cannot be sent.Methods in com.sun.mail.smtp that throw MessagingException Modifier and Type Method Description booleanSaslAuthenticator. authenticate(String[] mechs, String realm, String authzid, String u, String p)booleanSMTPSaslAuthenticator. authenticate(String[] mechs, String realm, String authzid, String u, String p)protected OutputStreamSMTPTransport. bdat()Return a stream that will use the SMTP BDAT command to send data.voidSMTPTransport. close()Close the Transport and terminate the connection to the server.voidSMTPTransport. connect(Socket socket)Start the SMTP protocol on the given socket, which was already connected by the caller.protected OutputStreamSMTPTransport. data()Send theDATAcommand to the SMTP host and return an OutputStream to which the data is to be written.protected booleanSMTPTransport. ehlo(String domain)Issue theEHLOcommand.protected voidSMTPTransport. finishBdat()Terminate the sent data.protected voidSMTPTransport. finishData()Terminate the sent data.protected voidSMTPTransport. helo(String domain)Issue theHELOcommand.voidSMTPTransport. issueCommand(String cmd, int expect)Send the command to the server.protected voidSMTPTransport. mailFrom()Issue theMAIL FROM:command to start sending a message.protected booleanSMTPTransport. protocolConnect(String host, int port, String user, String password)Performs the actual protocol-specific connection attempt.protected voidSMTPTransport. rcptTo()Sends each address to the SMTP host using theRCPT TO:command and copies the address either into the validSentAddr or invalidAddr arrays.protected intSMTPTransport. readServerResponse()Reads server reponse returning thereturnCodeas the number.protected voidSMTPTransport. sendCommand(String cmd)Sends commandcmdto the server terminating it withCRLF.voidSMTPTransport. sendMessage(Message message, Address[] addresses)Send the Message to the specified list of addresses.protected intSMTPTransport. simpleCommand(byte[] cmd)Send the command to the server and return the response code from the server.intSMTPTransport. simpleCommand(String cmd)Send the command to the server and return the response code from the server.protected voidSMTPTransport. startTLS()Issue theSTARTTLScommand and switch the socket to TLS mode if it succeeds.Constructors in com.sun.mail.smtp that throw MessagingException Constructor Description SMTPMessage(MimeMessage source)Constructs a new SMTPMessage with content initialized from thesourceMimeMessage.SMTPMessage(Session session, InputStream is)Constructs an SMTPMessage by reading and parsing the data from the specified MIME InputStream. -
Uses of MessagingException in com.sun.mail.util
Subclasses of MessagingException in com.sun.mail.util Modifier and Type Class Description classMailConnectExceptionA MessagingException that indicates a socket connection attempt failed.Methods in com.sun.mail.util that throw MessagingException Modifier and Type Method Description InputStreamReadableMime. getMimeStream()Return the MIME format stream corresponding to this message part. -
Uses of MessagingException in jakarta.mail
Subclasses of MessagingException in jakarta.mail Modifier and Type Class Description classAuthenticationFailedExceptionThis exception is thrown when the connect method on a Store or Transport object fails due to an authentication failure (e.g., bad user name or password).classFolderClosedExceptionThis exception is thrown when a method is invoked on a Messaging object and the Folder that owns that object has died due to some reason.classFolderNotFoundExceptionThis exception is thrown by Folder methods, when those methods are invoked on a non existent folder.classIllegalWriteExceptionThe exception thrown when a write is attempted on a read-only attribute of any Messaging object.classMessageRemovedExceptionThe exception thrown when an invalid method is invoked on an expunged Message.classMethodNotSupportedExceptionThe exception thrown when a method is not supported by the implementationclassNoSuchProviderExceptionThis exception is thrown when Session attempts to instantiate a Provider that doesn't exist.classReadOnlyFolderExceptionThis exception is thrown when an attempt is made to open a folder read-write access when the folder is marked read-only.classSendFailedExceptionThis exception is thrown when the message cannot be sent.classStoreClosedExceptionThis exception is thrown when a method is invoked on a Messaging object and the Store that owns that object has died due to some reason.Methods in jakarta.mail that throw MessagingException Modifier and Type Method Description voidMultipart. addBodyPart(BodyPart part)Adds a Part to the multipart.voidMultipart. addBodyPart(BodyPart part, int index)Adds a BodyPart at positionindex.abstract voidMessage. addFrom(Address[] addresses)Add these addresses to the existing "From" attributevoidPart. addHeader(String header_name, String header_value)Add this value to the existing values for this header_name.voidMessage. addRecipient(Message.RecipientType type, Address address)Add this recipient address to the existing ones of the given type.abstract voidMessage. addRecipients(Message.RecipientType type, Address[] addresses)Add these recipient addresses to the existing ones of the given type.abstract voidFolder. appendMessages(Message[] msgs)Append given Messages to this folder.voidFolder. close()Close this Folder and expunge deleted messages.abstract voidFolder. close(boolean expunge)Close this Folder.voidService. close()Close this service and terminate its connection.voidService. connect()A generic connect method that takes no parameters.voidService. connect(String host, int port, String user, String password)Similar to connect(host, user, password) except a specific port can be specified.voidService. connect(String user, String password)Connect to the current host using the specified username and password.voidService. connect(String host, String user, String password)Connect to the specified address.voidFolder. copyMessages(Message[] msgs, Folder folder)Copy the specified Messages from this Folder into another Folder.abstract booleanFolder. create(int type)Create this folder on the Store.abstract booleanFolder. delete(boolean recurse)Delete this Folder.abstract booleanFolder. exists()Tests if this folder physically exists on the Store.abstract Message[]Folder. expunge()Expunge (permanently remove) messages marked DELETED.voidFolder. fetch(Message[] msgs, FetchProfile fp)Prefetch the items specified in the FetchProfile for the given Messages.Enumeration<Header>Part. getAllHeaders()Return all the headers from this part as an Enumeration of Header objects.Address[]Message. getAllRecipients()Get all the recipient addresses for the message.BodyPartMultipart. getBodyPart(int index)Get the specified Part.BodyPartMultipartDataSource. getBodyPart(int index)Get the specified Part.ObjectPart. getContent()Return the content as a Java object.StringPart. getContentType()Returns the Content-Type of the content of this part.intMultipart. getCount()Return the number of enclosed BodyPart objects.jakarta.activation.DataHandlerPart. getDataHandler()Return a DataHandler for the content within this part.abstract FolderStore. getDefaultFolder()Returns a Folder object that represents the 'root' of the default namespace presented to the user by the Store.intFolder. getDeletedMessageCount()Get the number of deleted messages in this Folder.StringPart. getDescription()Return a description String for this part.StringPart. getDisposition()Return the disposition of this part.StringPart. getFileName()Get the filename associated with this part, if possible.abstract FlagsMessage. getFlags()Returns aFlagsobject containing the flags for this message.abstract FolderFolder. getFolder(String name)Return the Folder object corresponding to the given name.FolderSession. getFolder(URLName url)Get a closed Folder object for the given URLName.abstract FolderStore. getFolder(URLName url)Return a closed Folder object, corresponding to the given URLName.abstract FolderStore. getFolder(String name)Return the Folder object corresponding to the given name.abstract Address[]Message. getFrom()Returns the "From" attribute.String[]Part. getHeader(String header_name)Get all the headers for this header name.InputStreamPart. getInputStream()Return an input stream for this part's "content".intPart. getLineCount()Return the number of lines in the content of this part.Enumeration<Header>Part. getMatchingHeaders(String[] header_names)Return matching headers from this part as an Enumeration of Header objects.abstract MessageFolder. getMessage(int msgnum)Get the Message object corresponding to the given message number.MessageUIDFolder. getMessageByUID(long uid)Get the Message corresponding to the given UID.abstract intFolder. getMessageCount()Get total number of messages in this Folder.Message[]Folder. getMessages()Get all Message objects from this Folder.Message[]Folder. getMessages(int[] msgnums)Get the Message objects for message numbers specified in the array.Message[]Folder. getMessages(int start, int end)Get the Message objects for message numbers ranging from start through end, both start and end inclusive.Message[]UIDFolder. getMessagesByUID(long[] uids)Get the Messages specified by the given array of UIDs.Message[]UIDFolder. getMessagesByUID(long start, long end)Get the Messages specified by the given range.intFolder. getNewMessageCount()Get the number of new messages in this Folder.Enumeration<Header>Part. getNonMatchingHeaders(String[] header_names)Return non-matching headers from this envelope as an Enumeration of Header objects.abstract FolderFolder. getParent()Returns the parent folder of this folder.Folder[]Store. getPersonalNamespaces()Return a set of folders representing the personal namespaces for the current user.Quota[]QuotaAwareStore. getQuota(String folder)Get the quotas for the named folder.abstract DateMessage. getReceivedDate()Get the date this message was received.abstract Address[]Message. getRecipients(Message.RecipientType type)Get all the recipient addresses of the given type.Address[]Message. getReplyTo()Get the addresses to which replies should be directed.abstract DateMessage. getSentDate()Get the date this message was sent.abstract charFolder. getSeparator()Return the delimiter character that separates this Folder's pathname from the names of immediate subfolders.Folder[]Store. getSharedNamespaces()Return a set of folders representing the shared namespaces.intPart. getSize()Return the size of the content of this part in bytes.abstract StringMessage. getSubject()Get the subject of this message.abstract intFolder. getType()Returns the type of this Folder, that is, whether this folder can hold messages or subfolders or both.longUIDFolder. getUID(Message message)Get the UID for the specified message.longUIDFolder. getUIDNext()Returns the predicted UID that will be assigned to the next message that is appended to this folder.longUIDFolder. getUIDValidity()Returns the UIDValidity value associated with this folder.intFolder. getUnreadMessageCount()Get the total number of unread messages in this Folder.URLNameFolder. getURLName()Return a URLName representing this folder.Folder[]Store. getUserNamespaces(String user)Return a set of folders representing the namespaces foruser.abstract booleanFolder. hasNewMessages()Returns true if this Folder has new messages since the last time this indication was reset.booleanPart. isMimeType(String mimeType)Is this Part of the specified MIME type? This method compares only theprimaryTypeandsubType.booleanMessage. isSet(Flags.Flag flag)Check whether the flag specified in theflagargument is set in this message.Folder[]Folder. list()Convenience method that returns the list of folders under this Folder.abstract Folder[]Folder. list(String pattern)Returns a list of Folders belonging to this Folder's namespace that match the specified pattern.Folder[]Folder. listSubscribed()Convenience method that returns the list of subscribed folders under this Folder.Folder[]Folder. listSubscribed(String pattern)Returns a list of subscribed Folders belonging to this Folder's namespace that match the specified pattern.booleanMessage. match(SearchTerm term)Apply the specified Search criterion to this message.abstract voidFolder. open(int mode)Open this Folder.protected booleanService. protocolConnect(String host, int port, String user, String password)The service implementation should override this method to perform the actual protocol-specific connection attempt.voidMultipart. removeBodyPart(int index)Remove the part at specified location (starting from 0).booleanMultipart. removeBodyPart(BodyPart part)Remove the specified part from the multipart message.voidPart. removeHeader(String header_name)Remove all headers with this name.abstract booleanFolder. renameTo(Folder f)Rename this Folder.abstract MessageMessage. reply(boolean replyToAll)Get a new Message suitable for a reply to this message.abstract voidMessage. saveChanges()Save any changes made to this message into the message-store when the containing folder is closed, if the message is contained in a folder.Message[]Folder. search(SearchTerm term)Search this Folder for messages matching the specified search criterion.Message[]Folder. search(SearchTerm term, Message[] msgs)Search the given array of messages for those that match the specified search criterion.static voidTransport. send(Message msg)Send a message.static voidTransport. send(Message msg, Address[] addresses)Send the message to the specified addresses, ignoring any recipients specified in the message itself.static voidTransport. send(Message msg, Address[] addresses, String user, String password)Send the message to the specified addresses, ignoring any recipients specified in the message itself.static voidTransport. send(Message msg, String user, String password)Send a message.abstract voidTransport. sendMessage(Message msg, Address[] addresses)Send the Message to the specified list of addresses.voidPart. setContent(Multipart mp)This method sets the given Multipart object as this message's content.voidPart. setContent(Object obj, String type)A convenience method for setting this part's content.voidPart. setDataHandler(jakarta.activation.DataHandler dh)This method provides the mechanism to set this part's content.voidPart. setDescription(String description)Set a description String for this part.voidPart. setDisposition(String disposition)Set the disposition of this part.voidPart. setFileName(String filename)Set the filename associated with this part, if possible.voidMessage. setFlag(Flags.Flag flag, boolean set)Set the specified flag on this message to the specified value.voidFolder. setFlags(int[] msgnums, Flags flag, boolean value)Set the specified flags on the messages whose message numbers are in the array.voidFolder. setFlags(int start, int end, Flags flag, boolean value)Set the specified flags on the messages numbered from start through end, both start and end inclusive.voidFolder. setFlags(Message[] msgs, Flags flag, boolean value)Set the specified flags on the messages specified in the array.abstract voidMessage. setFlags(Flags flag, boolean set)Set the specified flags on this message to the specified value.abstract voidMessage. setFrom()Set the "From" attribute in this Message.abstract voidMessage. setFrom(Address address)Set the "From" attribute in this Message.voidPart. setHeader(String header_name, String header_value)Set the value for this header_name.protected voidMultipart. setMultipartDataSource(MultipartDataSource mp)Setup this Multipart object from the given MultipartDataSource.voidQuotaAwareStore. setQuota(Quota quota)Set the quotas for the quota root specified in the quota argument.voidMessage. setRecipient(Message.RecipientType type, Address address)Set the recipient address.abstract voidMessage. setRecipients(Message.RecipientType type, Address[] addresses)Set the recipient addresses.voidMessage. setReplyTo(Address[] addresses)Set the addresses to which replies should be directed.abstract voidMessage. setSentDate(Date date)Set the sent date of this message.abstract voidMessage. setSubject(String subject)Set the subject of this message.voidFolder. setSubscribed(boolean subscribe)Subscribe or unsubscribe this Folder.voidPart. setText(String text)A convenience method that sets the given String as this part's content with a MIME type of "text/plain".abstract voidMultipart. writeTo(OutputStream os)Output an appropriately encoded bytestream to the given OutputStream.voidPart. writeTo(OutputStream os)Output a bytestream for this Part. -
Uses of MessagingException in jakarta.mail.internet
Subclasses of MessagingException in jakarta.mail.internet Modifier and Type Class Description classAddressExceptionThe exception thrown when a wrongly formatted address is encountered.classParseExceptionThe exception thrown due to an error in parsing RFC822 or MIME headers, including multipart bodies.Methods in jakarta.mail.internet that throw MessagingException Modifier and Type Method Description voidMimeMultipart. addBodyPart(BodyPart part)Adds a Part to the multipart.voidMimeMultipart. addBodyPart(BodyPart part, int index)Adds a BodyPart at positionindex.voidMimeMessage. addFrom(Address[] addresses)Add the specified addresses to the existing "From" field.voidMimeBodyPart. addHeader(String name, String value)Add this value to the existing values for this header_name.voidMimeMessage. addHeader(String name, String value)Add this value to the existing values for this header_name.voidMimeBodyPart. addHeaderLine(String line)Add a header line to this body partvoidMimeMessage. addHeaderLine(String line)Add a raw RFC 822 header-line.voidMimePart. addHeaderLine(String line)Add a raw RFC822 header-line.voidMimeMessage. addRecipients(Message.RecipientType type, Address[] addresses)Add the given addresses to the specified recipient type.voidMimeMessage. addRecipients(Message.RecipientType type, String addresses)Add the given addresses to the specified recipient type.voidMimeBodyPart. attachFile(File file)Use the specified file to provide the data for this part.voidMimeBodyPart. attachFile(File file, String contentType, String encoding)Use the specified file with the specified Content-Type and Content-Transfer-Encoding to provide the data for this part.voidMimeBodyPart. attachFile(String file)Use the specified file to provide the data for this part.voidMimeBodyPart. attachFile(String file, String contentType, String encoding)Use the specified file with the specified Content-Type and Content-Transfer-Encoding to provide the data for this part.protected InternetHeadersMimeMessage. createInternetHeaders(InputStream is)Create and return an InternetHeaders object that loads the headers from the given InputStream.protected InternetHeadersMimeMultipart. createInternetHeaders(InputStream is)Create and return an InternetHeaders object that loads the headers from the given InputStream.protected MimeBodyPartMimeMultipart. createMimeBodyPart(InternetHeaders headers, byte[] content)Create and return a MimeBodyPart object to represent a body part parsed from the InputStream.protected MimeBodyPartMimeMultipart. createMimeBodyPart(InputStream is)Create and return a MimeBodyPart object to represent a body part parsed from the InputStream.protected MimeMessageMimeMessage. createMimeMessage(Session session)Create and return a MimeMessage object.static InputStreamMimeUtility. decode(InputStream is, String encoding)Decode the given input stream.static OutputStreamMimeUtility. encode(OutputStream os, String encoding)Wrap an encoder around the given output stream.static OutputStreamMimeUtility. encode(OutputStream os, String encoding, String filename)Wrap an encoder around the given output stream.Enumeration<String>MimeBodyPart. getAllHeaderLines()Get all header lines as an Enumeration of Strings.Enumeration<String>MimeMessage. getAllHeaderLines()Get all header lines as an Enumeration of Strings.Enumeration<String>MimePart. getAllHeaderLines()Get all header lines as an Enumeration of Strings.Enumeration<Header>MimeBodyPart. getAllHeaders()Return all the headers from this Message as an Enumeration of Header objects.Enumeration<Header>MimeMessage. getAllHeaders()Return all the headers from this Message as an enumeration of Header objects.Address[]MimeMessage. getAllRecipients()Get all the recipient addresses for the message.BodyPartMimeMultipart. getBodyPart(int index)Get the specified BodyPart.BodyPartMimeMultipart. getBodyPart(String CID)Get the MimeBodyPart referred to by the given ContentID (CID).ObjectMimeBodyPart. getContent()Return the content as a Java object.ObjectMimeMessage. getContent()Return the content as a Java object.StringMimeBodyPart. getContentID()Returns the value of the "Content-ID" header field.StringMimeMessage. getContentID()Returns the value of the "Content-ID" header field.StringMimePart. getContentID()Get the Content-ID of this part.String[]MimeBodyPart. getContentLanguage()Get the languages specified in the Content-Language header of this MimePart.String[]MimeMessage. getContentLanguage()Get the languages specified in the "Content-Language" header field of this message.String[]MimePart. getContentLanguage()Get the language tags specified in the Content-Language header of this MimePart.StringMimeBodyPart. getContentMD5()Return the value of the "Content-MD5" header field.StringMimeMessage. getContentMD5()Return the value of the "Content-MD5" header field.StringMimePart. getContentMD5()Get the Content-MD5 digest of this part.protected InputStreamMimeBodyPart. getContentStream()Produce the raw bytes of the content.protected InputStreamMimeMessage. getContentStream()Produce the raw bytes of the content.StringMimeBodyPart. getContentType()Returns the value of the RFC 822 "Content-Type" header field.StringMimeMessage. getContentType()Returns the value of the RFC 822 "Content-Type" header field.intMimeMultipart. getCount()Return the number of enclosed BodyPart objects.jakarta.activation.DataHandlerMimeBodyPart. getDataHandler()Return a DataHandler for this body part's content.jakarta.activation.DataHandlerMimeMessage. getDataHandler()Return a DataHandler for this Message's content.StringMimeBodyPart. getDescription()Returns the "Content-Description" header field of this body part.StringMimeMessage. getDescription()Returns the "Content-Description" header field of this Message.StringMimeBodyPart. getDisposition()Returns the disposition from the "Content-Disposition" header field.StringMimeMessage. getDisposition()Returns the disposition from the "Content-Disposition" header field.StringMimeBodyPart. getEncoding()Returns the content transfer encoding from the "Content-Transfer-Encoding" header field.StringMimeMessage. getEncoding()Returns the content transfer encoding from the "Content-Transfer-Encoding" header field.StringMimePart. getEncoding()Get the transfer encoding of this part.StringPreencodedMimeBodyPart. getEncoding()Returns the content transfer encoding specified when this object was created.StringMimeBodyPart. getFileName()Get the filename associated with this body part.StringMimeMessage. getFileName()Get the filename associated with this Message.FlagsMimeMessage. getFlags()Return aFlagsobject containing the flags for this message.Address[]MimeMessage. getFrom()Returns the value of the RFC 822 "From" header fields.String[]MimeBodyPart. getHeader(String name)Get all the headers for this header_name.StringMimeBodyPart. getHeader(String name, String delimiter)Get all the headers for this header name, returned as a single String, with headers separated by the delimiter.String[]MimeMessage. getHeader(String name)Get all the headers for this header_name.StringMimeMessage. getHeader(String name, String delimiter)Get all the headers for this header name, returned as a single String, with headers separated by the delimiter.StringMimePart. getHeader(String name, String delimiter)Get the values of all header fields available for this header, returned as a single String, with the values separated by the delimiter.InputStreamMimeBodyPart. getInputStream()Return a decoded input stream for this body part's "content".InputStreamMimeMessage. getInputStream()Return a decoded input stream for this Message's "content".intMimeBodyPart. getLineCount()Return the number of lines for the content of this Part.intMimeMessage. getLineCount()Return the number of lines for the content of this message.Enumeration<String>MimeBodyPart. getMatchingHeaderLines(String[] names)Get matching header lines as an Enumeration of Strings.Enumeration<String>MimeMessage. getMatchingHeaderLines(String[] names)Get matching header lines as an Enumeration of Strings.Enumeration<String>MimePart. getMatchingHeaderLines(String[] names)Get matching header lines as an Enumeration of Strings.Enumeration<Header>MimeBodyPart. getMatchingHeaders(String[] names)Return matching headers from this Message as an Enumeration of Header objects.Enumeration<Header>MimeMessage. getMatchingHeaders(String[] names)Return matching headers from this Message as an Enumeration of Header objects.StringMimeMessage. getMessageID()Returns the value of the "Message-ID" header field.Enumeration<String>MimeBodyPart. getNonMatchingHeaderLines(String[] names)Get non-matching header lines as an Enumeration of Strings.Enumeration<String>MimeMessage. getNonMatchingHeaderLines(String[] names)Get non-matching header lines as an Enumeration of Strings.Enumeration<String>MimePart. getNonMatchingHeaderLines(String[] names)Get non-matching header lines as an Enumeration of Strings.Enumeration<Header>MimeBodyPart. getNonMatchingHeaders(String[] names)Return non-matching headers from this Message as an Enumeration of Header objects.Enumeration<Header>MimeMessage. getNonMatchingHeaders(String[] names)Return non-matching headers from this Message as an Enumeration of Header objects.StringMimeMultipart. getPreamble()Get the preamble text, if any, that appears before the first body part of this multipart.InputStreamMimeBodyPart. getRawInputStream()Return an InputStream to the raw data with any Content-Transfer-Encoding intact.InputStreamMimeMessage. getRawInputStream()Return an InputStream to the raw data with any Content-Transfer-Encoding intact.DateMimeMessage. getReceivedDate()Returns the Date on this message was received.Address[]MimeMessage. getRecipients(Message.RecipientType type)Returns the recepients specified by the type.Address[]MimeMessage. getReplyTo()Return the value of the RFC 822 "Reply-To" header field.AddressMimeMessage. getSender()Returns the value of the RFC 822 "Sender" header field.DateMimeMessage. getSentDate()Returns the value of the RFC 822 "Date" field.intMimeBodyPart. getSize()Return the size of the content of this body part in bytes.intMimeMessage. getSize()Return the size of the content of this message in bytes.StringMimeMessage. getSubject()Returns the value of the "Subject" header field.booleanMimeMultipart. isComplete()Return true if the final boundary line for this multipart was seen.booleanMimeBodyPart. isMimeType(String mimeType)Is this Part of the specified MIME type? This method compares only theprimaryTypeandsubType.booleanMimeMessage. isMimeType(String mimeType)Is this Part of the specified MIME type? This method compares only theprimaryTypeandsubType.booleanMimeMessage. isSet(Flags.Flag flag)Check whether the flag specified in theflagargument is set in this message.voidInternetHeaders. load(InputStream is)Read and parse the given RFC822 message stream till the blank line separating the header from the body.voidInternetHeaders. load(InputStream is, boolean allowutf8)Read and parse the given RFC822 message stream till the blank line separating the header from the body.protected voidMimeMessage. parse(InputStream is)Parse the InputStream setting theheadersandcontentfields appropriately.protected voidMimeMultipart. parse()Parse the InputStream from our DataSource, constructing the appropriate MimeBodyParts.voidMimeMultipart. removeBodyPart(int index)Remove the part at specified location (starting from 0).booleanMimeMultipart. removeBodyPart(BodyPart part)Remove the specified part from the multipart message.voidMimeBodyPart. removeHeader(String name)Remove all headers with this name.voidMimeMessage. removeHeader(String name)Remove all headers with this name.MessageMimeMessage. reply(boolean replyToAll)Get a new Message suitable for a reply to this message.MessageMimeMessage. reply(boolean replyToAll, boolean setAnswered)Get a new Message suitable for a reply to this message.voidMimeMessage. saveChanges()Updates the appropriate header fields of this message to be consistent with the message's contents.voidMimeBodyPart. saveFile(File file)Save the contents of this part in the specified file.voidMimeBodyPart. saveFile(String file)Save the contents of this part in the specified file.voidMimeBodyPart. setContent(Multipart mp)This method sets the body part's content to a Multipart object.voidMimeBodyPart. setContent(Object o, String type)A convenience method for setting this body part's content.voidMimeMessage. setContent(Multipart mp)This method sets the Message's content to a Multipart object.voidMimeMessage. setContent(Object o, String type)A convenience method for setting this Message's content.voidMimeBodyPart. setContentID(String cid)Set the "Content-ID" header field of this body part.voidMimeMessage. setContentID(String cid)Set the "Content-ID" header field of this Message.voidMimeBodyPart. setContentLanguage(String[] languages)Set the Content-Language header of this MimePart.voidMimeMessage. setContentLanguage(String[] languages)Set the "Content-Language" header of this MimePart.voidMimePart. setContentLanguage(String[] languages)Set the Content-Language header of this MimePart.voidMimeBodyPart. setContentMD5(String md5)Set the "Content-MD5" header field of this body part.voidMimeMessage. setContentMD5(String md5)Set the "Content-MD5" header field of this Message.voidMimePart. setContentMD5(String md5)Set the Content-MD5 of this part.voidMimeBodyPart. setDataHandler(jakarta.activation.DataHandler dh)This method provides the mechanism to set this body part's content.voidMimeMessage. setDataHandler(jakarta.activation.DataHandler dh)This method provides the mechanism to set this part's content.voidMimeBodyPart. setDescription(String description)Set the "Content-Description" header field for this body part.voidMimeBodyPart. setDescription(String description, String charset)Set the "Content-Description" header field for this body part.voidMimeMessage. setDescription(String description)Set the "Content-Description" header field for this Message.voidMimeMessage. setDescription(String description, String charset)Set the "Content-Description" header field for this Message.voidMimeBodyPart. setDisposition(String disposition)Set the disposition in the "Content-Disposition" header field of this body part.voidMimeMessage. setDisposition(String disposition)Set the disposition in the "Content-Disposition" header field of this body part.voidMimeBodyPart. setFileName(String filename)Set the filename associated with this body part, if possible.voidMimeMessage. setFileName(String filename)Set the filename associated with this part, if possible.voidMimeMessage. setFlags(Flags flag, boolean set)Set the flags for this message.voidMimeMessage. setFrom()Set the RFC 822 "From" header field using the value of theInternetAddress.getLocalAddressmethod.voidMimeMessage. setFrom(Address address)Set the RFC 822 "From" header field.voidMimeMessage. setFrom(String address)Set the RFC 822 "From" header field.voidMimeBodyPart. setHeader(String name, String value)Set the value for this header_name.voidMimeMessage. setHeader(String name, String value)Set the value for this header_name.voidMimeMultipart. setPreamble(String preamble)Set the preamble text to be included before the first body part.voidMimeMessage. setRecipients(Message.RecipientType type, Address[] addresses)Set the specified recipient type to the given addresses.voidMimeMessage. setRecipients(Message.RecipientType type, String addresses)Set the specified recipient type to the given addresses.voidMimeMessage. setReplyTo(Address[] addresses)Set the RFC 822 "Reply-To" header field.voidMimeMessage. setSender(Address address)Set the RFC 822 "Sender" header field.voidMimeMessage. setSentDate(Date d)Set the RFC 822 "Date" header field.voidMimeMessage. setSubject(String subject)Set the "Subject" header field.voidMimeMessage. setSubject(String subject, String charset)Set the "Subject" header field.voidMimeMultipart. setSubType(String subtype)Set the subtype.voidMimeBodyPart. setText(String text)Convenience method that sets the given String as this part's content, with a MIME type of "text/plain".voidMimeBodyPart. setText(String text, String charset)Convenience method that sets the given String as this part's content, with a MIME type of "text/plain" and the specified charset.voidMimeBodyPart. setText(String text, String charset, String subtype)Convenience method that sets the given String as this part's content, with a primary MIME type of "text" and the specified MIME subtype.voidMimeMessage. setText(String text)Convenience method that sets the given String as this part's content, with a MIME type of "text/plain".voidMimeMessage. setText(String text, String charset)Convenience method that sets the given String as this part's content, with a MIME type of "text/plain" and the specified charset.voidMimeMessage. setText(String text, String charset, String subtype)Convenience method that sets the given String as this part's content, with a primary MIME type of "text" and the specified MIME subtype.voidMimePart. setText(String text)Convenience method that sets the given String as this part's content, with a MIME type of "text/plain".voidMimePart. setText(String text, String charset)Convenience method that sets the given String as this part's content, with a MIME type of "text/plain" and the specified charset.voidMimePart. setText(String text, String charset, String subtype)Convenience method that sets the given String as this part's content, with a primary MIME type of "text" and the specified MIME subtype.protected voidMimeBodyPart. updateHeaders()Examine the content of this body part and update the appropriate MIME headers.protected voidMimeMessage. updateHeaders()Called by thesaveChangesmethod to actually update the MIME headers.protected voidMimeMultipart. updateHeaders()Update headers.protected voidPreencodedMimeBodyPart. updateHeaders()Force theContent-Transfer-Encodingheader to use the encoding that was specified when this object was created.protected voidMimeMessage. updateMessageID()Update the Message-ID header.voidMimeBodyPart. writeTo(OutputStream os)Output the body part as an RFC 822 format stream.voidMimeMessage. writeTo(OutputStream os)Output the message as an RFC 822 format stream.voidMimeMessage. writeTo(OutputStream os, String[] ignoreList)Output the message as an RFC 822 format stream, without specified headers.voidMimeMultipart. writeTo(OutputStream os)Iterates through all the parts and outputs each MIME part separated by a boundary.voidPreencodedMimeBodyPart. writeTo(OutputStream os)Output the body part as an RFC 822 format stream.Constructors in jakarta.mail.internet that throw MessagingException Constructor Description InternetHeaders(InputStream is)Read and parse the given RFC822 message stream till the blank line separating the header from the body.InternetHeaders(InputStream is, boolean allowutf8)Read and parse the given RFC822 message stream till the blank line separating the header from the body.MimeBodyPart(InternetHeaders headers, byte[] content)Constructs a MimeBodyPart using the given header and content bytes.MimeBodyPart(InputStream is)Constructs a MimeBodyPart by reading and parsing the data from the specified input stream.MimeMessage(Folder folder, InternetHeaders headers, byte[] content, int msgnum)Constructs a MimeMessage from the given InternetHeaders object and content.MimeMessage(Folder folder, InputStream is, int msgnum)Constructs a MimeMessage by reading and parsing the data from the specified MIME InputStream.MimeMessage(MimeMessage source)Constructs a new MimeMessage with content initialized from thesourceMimeMessage.MimeMessage(Session session, InputStream is)Constructs a MimeMessage by reading and parsing the data from the specified MIME InputStream.MimeMultipart(jakarta.activation.DataSource ds)Constructs a MimeMultipart object and its bodyparts from the given DataSource.MimeMultipart(BodyPart... parts)Construct a MimeMultipart object of the default "mixed" subtype, and with the given body parts.MimeMultipart(String subtype, BodyPart... parts)Construct a MimeMultipart object of the given subtype and with the given body parts. -
Uses of MessagingException in jakarta.mail.search
Subclasses of MessagingException in jakarta.mail.search Modifier and Type Class Description classSearchExceptionThe exception thrown when a Search expression could not be handled.
-