<html> <head> <title>Interface XMailService</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../idl.css"> </head> <body> <div id="adc-idlref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="3"> <tr> <td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td> <td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td> <td class="navimain"><a href="XMailService-xref.html" class="navimain">Use</a></td> <td class="navimainnone">Devguide</td> <td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td> </tr> </table> <table class="navisub" border="0" cellpadding="0"> <tr> <td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td> <td class="navisub">Attributes' Summary</td> <td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td> <td class="navisub">Attributes' Details</td> </tr> </table> <hr> <table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;"> <tr> <td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">mail</a> :: </p> </td> </tr> <tr> <td class="title"><table class="title-table" width="99%"> <tr> <td width="25%" class="title2">unpublished </td> <td width="50%" class="title">interface XMailService</td> <td width="*"/></tr> </table> </td> </tr> <tr> <td/></tr> <tr> <td><dl> <dt><b>Usage Restrictions</b></dt> <dd><i>not published</i></dd> <dt><b>Description</b></dt> <dd>Represents a mail server abstraction. </dd> <dt><b>Since </b></dt> <dd>OpenOffice 2.0</dd> </dl> </td> </tr> </table> <hr> <a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Methods' Summary</td> </tr> <tr> <td class="imsum_left"><a href="#getSupportedConnectionTypes">getSupportedConnectionTypes</a></td> <td class="imsum_right">Returns all connection types which are supported to connect to the mail service. At least support insecure connections must be supported. Currently defined connection types are (the values should be handled case insensitive): "Insecure" - insecure connections "Ssl" - Secure Socket Layer 2.0/3.0 based connection </td> </tr> <tr> <td class="imsum_left"><a href="#addConnectionListener">addConnectionListener</a></td> <td class="imsum_right">Register a connection listener. </td> </tr> <tr> <td class="imsum_left"><a href="#removeConnectionListener">removeConnectionListener</a></td> <td class="imsum_right">Unregister a connection listener. </td> </tr> <tr> <td class="imsum_left"><a href="#getCurrentConnectionContext">getCurrentConnectionContext</a></td> <td class="imsum_right">Return the context of the current connnection. The context contains information like the server name, port, connection type etc. @precond <code>isConnected</code> returns true. </td> </tr> <tr> <td class="imsum_left"><a href="#connect">connect</a></td> <td class="imsum_right">Connect to a mail service. Only one connection to a mail service can be established at a time. </td> </tr> <tr> <td class="imsum_left"><a href="#disconnect">disconnect</a></td> <td class="imsum_right">Disconnect from a mail service. </td> </tr> <tr> <td class="imsum_left"><a href="#isConnected">isConnected</a></td> <td class="imsum_right">Returns whether a connection to a mail service currently exist or not. </td> </tr> </table> <a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle">Methods' Details</td> </tr> <tr> <td class="imdetail"><a name="getSupportedConnectionTypes" class="membertitle">getSupportedConnectionTypes</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< string ></td> </tr> <tr> <td valign="top"><b>getSupportedConnectionTypes</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Returns all connection types which are supported to connect to the mail service. At least support insecure connections must be supported. Currently defined connection types are (the values should be handled case insensitive): "Insecure" - insecure connections "Ssl" - Secure Socket Layer 2.0/3.0 based connection </dd> <dt><b>Returns</b></dt> <dd>a sequence of supported connection types. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="addConnectionListener" class="membertitle">addConnectionListener</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>addConnectionListener</b>(</td> <td valign="top">[in] <a href="XConnectionListener.html">XConnectionListener</a></td> <td valign="bottom"> xListener );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Register a connection listener. </dd> <dt><b>Parameter xListener</b></dt> <dd>[in] a listener that will be informed about connection events. </dd> <dt><b>See also</b></dt> <dd><a href="XConnectionListener.html">XConnectionListener</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="removeConnectionListener" class="membertitle">removeConnectionListener</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>removeConnectionListener</b>(</td> <td valign="top">[in] <a href="XConnectionListener.html">XConnectionListener</a></td> <td valign="bottom"> xListener );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Unregister a connection listener. </dd> <dt><b>Parameter xListener</b></dt> <dd>[in] a listener that no longer need to be informed about connection events. </dd> <dt><b>See also</b></dt> <dd><a href="XConnectionListener.html">XConnectionListener</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getCurrentConnectionContext" class="membertitle">getCurrentConnectionContext</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/XCurrentContext.html">XCurrentContext</a></td> </tr> <tr> <td valign="top"><b>getCurrentConnectionContext</b>()</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/NotConnectedException.html">NotConnectedException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Return the context of the current connnection. The context contains information like the server name, port, connection type etc. @precond <code>isConnected</code> returns true. </dd> <dt><b>Returns</b></dt> <dd>the current connection context. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::io::NotConnectedException if no connection is currently established. </dd> <dt><b>See also</b></dt> <dd>com::sun::star::mail::connectUser, ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/NotConnectedException.html">NotConnectedException</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="connect" class="membertitle">connect</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>connect</b>(</td> <td valign="top">[in] ::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/XCurrentContext.html">XCurrentContext</a></td> <td valign="bottom"> xConnectionContext,</td> </tr> <tr> <td/><td valign="top">[in] <a href="XAuthenticator.html">XAuthenticator</a></td> <td valign="bottom"> xAuthenticator )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a>,<br> ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/AlreadyConnectedException.html">AlreadyConnectedException</a>,<br> ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/UnknownHostException.html">UnknownHostException</a>,<br> ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/NoRouteToHostException.html">NoRouteToHostException</a>,<br> ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/ConnectException.html">ConnectException</a>,<br> ::com::sun::star::<a href="../auth/module-ix.html">auth</a>::<a href="../auth/AuthenticationFailedException.html">AuthenticationFailedException</a>,<br> <a href="MailException.html">MailException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Connect to a mail service. Only one connection to a mail service can be established at a time. </dd> <dt><b>Parameter xConnectionContext</b></dt> <dd>[in] an interface used to query for connection related information. The context must contain the following values: "ServerName" of type 'string', "Port" of type 'long', "ConnectionType" of type 'string'. A list of supported connection types can be queried using <code>getSupportedConnectionTypes</code>. </dd> <dt><b>Parameter xAuthenticator</b></dt> <dd>[in] an interface used to query for the necessary user information needed to login to the mail server. If no authentication is required the xAuthenticator must return an empty user name and an empty password. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::lang::IllegalArgumentException if the provided connection context contains invalid values or misses required connection parameters. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::io::AlreadyConnectedException on a try to connect to an already connect mail server. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::io::UnknownHostException usually if the IP address of the mail server could not be determined. Possible causes are a broken network connection, a wrong server name, an unreachable DNS server, etc. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::io::NoRouteToHostException if an error occured to connect to the remote mail server. Typically the remote mail server cannot be reach because of an intervening firewall, or if an intermediate router is down, the network connection is broken, etc. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::io::ConnectException if an error occured while attempting to connect to the remote mail server. Typically the connection was refused remotely, because the mail server is not listening on the remote address/port. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::auth::AuthenticationException if the specified user could not be logged in. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::mail::MailException for other errors during login. </dd> <dt><b>See also</b></dt> <dd>::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/XCurrentContext.html">XCurrentContext</a>, <a href="XAuthenticator.html">XAuthenticator</a>, ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a>, ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/AlreadyConnectedException.html">AlreadyConnectedException</a>, ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/UnknownHostException.html">UnknownHostException</a>, ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/NoRouteToHostException.html">NoRouteToHostException</a>, ::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/ConnectException.html">ConnectException</a>, com::sun::star::auth::AuthenticationException, com::sun::star::mail::IllegalStateException, <a href="MailException.html">MailException</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="disconnect" class="membertitle">disconnect</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>disconnect</b>()</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2"><a href="MailException.html">MailException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Disconnect from a mail service. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::mail::MailException if errors occur during disconnecting. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="isConnected" class="membertitle">isConnected</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">boolean</td> </tr> <tr> <td valign="top"><b>isConnected</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Returns whether a connection to a mail service currently exist or not. </dd> <dt><b>Returns</b></dt> <dd><b>true</b> if a connection to a mail service is established. </dd> </dl> </td> </tr> </table> </td> </tr> </table> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p> </div> <!-- id="adc-idlref" --> </body> </html>