| com.noelios.restlet.ClientHelper com.noelios.restlet.ext.javamail.JavaMailClientHelper
JavaMailClientHelper | public class JavaMailClientHelper extends ClientHelper (Code) | | Client connector to a mail server. Currently only the SMTP protocol is
supported. To send an email, specify a SMTP URI as the ressource reference of
the call and use an XML email as the content of the call. An SMTP URI has the
following syntax: smtp://host[:port] The default port used is 25
for SMTP and 465 for SMTPS. Use the Call.getSecurity().setLogin() and
setPassword() methods for authentication. Sample XML email:
Account activation
support@restlet.org
user@domain.com
log@restlet.org
author: Jerome Louvel (contact@noelios.com) |
JavaMailClientHelper | public JavaMailClientHelper(Client client)(Code) | | Constructor.
Parameters: client - The client to help. |
create | public static Request create(String smtpURI, Representation email, String login, String password)(Code) | | Creates a high-level request.
Parameters: smtpURI - The SMTP server's URI (ex: smtp://localhost). Parameters: email - The email to send (valid XML email). Parameters: login - Authenticate using this login name. Parameters: password - Authenticate using this password. |
create | public static Request create(String smtpURI, Representation email)(Code) | | Creates a high-level request.
Parameters: smtpURI - The SMTP server's URI (ex: smtp://localhost). Parameters: email - The email to send (valid XML email). |
handle | public void handle(Request request, Response response)(Code) | | Handles a call.
Parameters: request - The request to handle. Parameters: response - The response to update. |
|
|