/** * Opens session. */ public void open() { try { service.connect(); } catch (final MessagingException msex) { throw new MailException("Open session error", msex); } }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * A generic connect method that takes no parameters. Subclasses * can implement the appropriate authentication schemes. Subclasses * that need additional information might want to use some properties * or might get it interactively using a popup window. <p> * * If the connection is successful, an "open" <code>ConnectionEvent</code> * is delivered to any <code>ConnectionListeners</code> on this service. <p> * * Most clients should just call this method to connect to the service.<p> * * It is an error to connect to an already connected service. <p> * * The implementation provided here simply calls the following * <code>connect(String, String, String)</code> method with nulls. * * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * * @see javax.mail.event.ConnectionEvent */ public void connect() throws MessagingException { connect(null, null, null); }
/** * A generic connect method that takes no parameters. Subclasses * can implement the appropriate authentication schemes. Subclasses * that need additional information might want to use some properties * or might get it interactively using a popup window. <p> * * If the connection is successful, an "open" <code>ConnectionEvent</code> * is delivered to any <code>ConnectionListeners</code> on this service. <p> * * Most clients should just call this method to connect to the service.<p> * * It is an error to connect to an already connected service. <p> * * The implementation provided here simply calls the following * <code>connect(String, String, String)</code> method with nulls. * * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * * @see javax.mail.event.ConnectionEvent */ public void connect() throws MessagingException { connect(null, null, null); }
connect(host, -1, user, password);
connect(host, -1, user, password);
/** * A generic connect method that takes no parameters allowing subclasses * to implement an appropriate authentication scheme. * The default implementation calls <code>connect(null, null, null)</code> * @throws AuthenticationFailedException if authentication fails * @throws MessagingException for other failures */ public void connect() throws MessagingException { connect(null, null, null); }
/** * A generic connect method that takes no parameters allowing subclasses * to implement an appropriate authentication scheme. * The default implementation calls <code>connect(null, null, null)</code> * @throws AuthenticationFailedException if authentication fails * @throws MessagingException for other failures */ public void connect() throws MessagingException { connect(null, null, null); }
/** * Connect to the specified host using a simple username/password authenticaion scheme * and the default port. * The default implementation calls <code>connect(host, -1, user, password)</code> * * @param host the host to connect to * @param user the user name * @param password the user's password * @throws AuthenticationFailedException if authentication fails * @throws MessagingException for other failures */ public void connect(String host, String user, String password) throws MessagingException { connect(host, -1, user, password); }
/** * Connect to the specified host using a simple username/password authenticaion scheme * and the default host and port. * The default implementation calls <code>connect(host, -1, user, password)</code> * * @param user the user name * @param password the user's password * @throws AuthenticationFailedException if authentication fails * @throws MessagingException for other failures */ public void connect(String user, String password) throws MessagingException { connect(null, -1, user, password); }
/** * Connect to the specified host using a simple username/password authenticaion scheme * and the default port. * The default implementation calls <code>connect(host, -1, user, password)</code> * * @param host the host to connect to * @param user the user name * @param password the user's password * @throws AuthenticationFailedException if authentication fails * @throws MessagingException for other failures */ public void connect(String host, String user, String password) throws MessagingException { connect(host, -1, user, password); }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * Connect to the current host using the specified username * and password. This method is equivalent to calling the * <code>connect(host, user, password)</code> method with null * for the host name. * * @param user the user name * @param password this user's password * @exception AuthenticationFailedException for authentication failures * @exception MessagingException for other failures * @exception IllegalStateException if the service is already connected * @see javax.mail.event.ConnectionEvent * @see javax.mail.Session#setPasswordAuthentication * @see #connect(java.lang.String, java.lang.String, java.lang.String) * @since JavaMail 1.4 */ public void connect(String user, String password) throws MessagingException { connect(null, user, password); }
/** * Opens session. */ public void open() { try { service.connect(); } catch (final MessagingException msex) { throw new MailException("Open session error", msex); } }