java.lang.Object
javax.mail.Session
- See Also:
- Top Examples, Source Code
public boolean getDebug()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public PrintStream getDebugOut()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Session getDefaultInstance(Properties props)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Session getDefaultInstance(Properties props,
Authenticator authenticator)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Folder getFolder(URLName url)
throws MessagingException
- See Also:
-
getStore(URLName)
, NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Session getInstance(Properties props)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Session getInstance(Properties props,
Authenticator authenticator)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[63]List the available mail providers on your system
By Anonymous on 2004/07/27 03:10:02 Rate
//To list the available providers on your system:
import javax.mail.*;
class ListProviders
{
public static void main ( String [ ] args )
{
java.util.Properties properties = System.getProperties ( ) ;
Session session = Session.getInstance ( properties, null ) ;
Provider [ ] providers = session.getProviders ( ) ;
for ( int i = 0; i < providers.length; ++i )
{
System.out.println ( providers [ i ] ) ;
}
}
public PasswordAuthentication getPasswordAuthentication(URLName url)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Properties getProperties()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String getProperty(String name)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[837]Code from Indian Legend
By bipkumar { at } yahoo { dot } com on 2004/07/19 06:28:05 Rate
Properties props = System.getProperties ( ) ;
//Session session = Session.getDefaultInstance ( props, null ) ;
Session session = Session.getInstance ( props ) ;
//System.out.println ( "getDebug ( ) "+session.getDebug ( ) ) ;
//System.out.println ( "getProperties ( ) "+session.getProperties ( ) ) ;
//System.out.println ( "getProperty ( ) "+session.getProperty ( "os.name" ) ) ;
//System.out.println ( "getProperty ( ) "+session.getProperty ( "java.library.path" ) ) ;
//System.out.println ( "getProperty ( ) "+session.getProperty ( "os.version" ) ) ;
//System.out.println ( "getProperty ( ) "+session.getProperty ( "user.home" ) ) ;
//System.out.println ( "getProperty ( ) "+session.getProperty ( "user.timezone" ) ) ;
//System.out.println ( "getProperty ( ) "+session.getProperty ( "file.separator" ) ) ;
//System.out.println ( "getProperty ( ) "+session.getProperty ( "file.separator" ) ) ;
//code from Indian Legend
public Provider getProvider(String protocol)
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Provider[] getProviders()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Store getStore()
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[838]Connect to a Pop3 store
By bipkumar { at } yahoo { dot } com on 2004/10/13 09:38:44 Rate
Properties props = System.getProperties ( ) ;
//Session session = Session.getDefaultInstance ( props, null ) ;
Session session = Session.getInstance ( props ) ;
store = session.getStore ( "pop3" ) ;
store.connect ( server, username, password ) ;
//from Indian Legend
public Store getStore(String protocol)
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Store getStore(Provider provider)
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Store getStore(URLName url)
throws NoSuchProviderException
- See Also:
-
getFolder(URLName)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Transport getTransport()
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Transport getTransport(String protocol)
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Transport getTransport(Address address)
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Transport getTransport(Provider provider)
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Transport getTransport(URLName url)
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public PasswordAuthentication requestPasswordAuthentication(InetAddress addr,
int port,
String protocol,
String prompt,
String defaultUserName)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setDebug(boolean debug)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setDebugOut(PrintStream out)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setPasswordAuthentication(URLName url,
PasswordAuthentication pw)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setProvider(Provider provider)
throws NoSuchProviderException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples