@Deprecated public class JavaMailClientHelper extends ClientHelper
Request.setChallengeResponse(org.restlet.data.ChallengeResponse)
method to set the identified/login and secret/password. You will also need to
specify the ChallengeScheme.SMTP_PLAIN
challenge scheme.<?xml version="1.0" encoding="ISO-8859-1" ?> <email> <head> <subject>Account activation</subject> <from>support@restlet.org</from> <to>user@domain.com</to> <cc>log@restlet.org</cc> </head> <body><![CDATA[Your account was successfully created!]]></body> </email>To receive the list of emails, send a GET request to a resource reference on a POP or POPS URI, leaving the reference path empty. A POP URI has the following syntax: pop://host[:port]
Request.setChallengeResponse(org.restlet.data.ChallengeResponse)
method to set the identified/login and secret/password. You will also need to
specify the ChallengeScheme.POP_BASIC
or the
ChallengeScheme.POP_DIGEST
challenge scheme.<?xml version="1.0" encoding="ISO-8859-1" ?> <emails> <email href="/1234"/> <email href="/5678"/> <email href="/9012"/> <email href="/3456"/> </emails>To retrieve an individual email, just add the href attribute at the end of the POP URI, such as: pop://host/1234
Parameter name | Value type | Default value | Description |
---|---|---|---|
startTls | boolean | false | If true, the SMTP connector will attempt to start a TLS tunnel, right after the SMTP connection is established. |
debug | boolean | false | If true, the connector will generate JavaMail debug messages. |
representationMessageClass | String | null | If not null, represents the name of a class that extends the JavaMail
"javax.mail.Message" class. This class is able to generate a Message from an
XML representation and a JavaMail Session. The constructor must accept a
Representation and a JavaMail Session objects as parameters in this
order. |
Constructor and Description |
---|
JavaMailClientHelper(Client client)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected javax.mail.Message |
createMessage(Representation xmlMessage,
javax.mail.Session session)
Deprecated.
Creates a JavaMail message by parsing an XML representation.
|
protected Representation |
createRepresentation(javax.mail.Message message)
Deprecated.
Creates an XML representation based on a JavaMail message.
|
protected Representation |
createRepresentation(javax.mail.Message[] messages,
com.sun.mail.pop3.POP3Folder inbox)
Deprecated.
Creates an XML representation based on a list of JavaMail messages.
|
java.lang.String |
getRepresentationMessageClass()
Deprecated.
Returns the full name of the class used for generating JavaMail Message
instances from an XML representation and a JavaMail Session.
|
void |
handle(Request request,
Response response)
Deprecated.
|
boolean |
isDebug()
Deprecated.
Indicates if the connector should generate JavaMail debug messages.
|
boolean |
isStartTls()
Deprecated.
Indicates if the SMTP protocol should attempt to start a TLS tunnel.
|
getConnectorService, getContext, getProtocols, start, stop, update
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped
public JavaMailClientHelper(Client client)
client
- The client to help.protected javax.mail.Message createMessage(Representation xmlMessage, javax.mail.Session session) throws java.io.IOException, javax.mail.internet.AddressException, javax.mail.MessagingException
xmlMessage
- The XML message to parse.session
- The current JavaMail session.java.io.IOException
javax.mail.internet.AddressException
javax.mail.MessagingException
protected Representation createRepresentation(javax.mail.Message message) throws org.w3c.dom.DOMException, java.io.IOException, javax.mail.MessagingException
message
- The JavaMail message to format.org.w3c.dom.DOMException
java.io.IOException
javax.mail.MessagingException
protected Representation createRepresentation(javax.mail.Message[] messages, com.sun.mail.pop3.POP3Folder inbox) throws java.io.IOException, javax.mail.MessagingException
messages
- The list of JavaMail messages to format.java.io.IOException
javax.mail.MessagingException
public java.lang.String getRepresentationMessageClass()
public void handle(Request request, Response response)
handle
in class RestletHelper<Client>
public boolean isDebug()
public boolean isStartTls()
Copyright © 2005-2024 Restlet.