Version: BASE 6.1.0.2
Build No: cf20633.22

Problem: Mail providers created using the Admin console are not available in the mail Session.

Steps to recreate:
1. Create a new provider using the admin console with(values just for demonstration):
Scope: cell & node
Protocol: smtpab
Class Name: com.sun.mail.smtp.SMTPTransport
Type: TRANSPORT
2. Create a mail session that uses the above protocol as the mail transport protocol.(make sure "enable debug mode" is selected)
3.try to send a mail...
..
..
Context context = new InitialContext();
_mailSession = (Session) context.lookup("mail/urMailSession");
..
..
Message msg = new MimeMessage(_mailSession);
msg.setText(message);
recipient = new InternetAddress(to); msg.addRecipient(RecipientType.TO, recipient);
Transport.send(msg);

Result: The built-in smtp provider is used rather than the one created in step one. It is not even listed as a provider in the debug output only the built in provider are listed.

[10/08/07 09:38:21:796 IST] 00000024 SystemOut O DEBUG: JavaMail version 1.3.1
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: java.io.FileNotFoundException: C:\Program Files\IBM\SDP70\runtimes\base_v61\java\jre\lib\jav amail.providers (The system cannot find the file specified.)
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: URL file:/C:/workspaces/sametimeAdvanced/MailSessionPrototype/WebContent/META-INF/javamail.providers
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: successfully loaded resource: file:/C:/workspaces/sametimeAdvanced/MailSessionPrototype/WebContent/META-INF/javamail.providers
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: Tables of loaded providers
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPTransport=javax.mail.Provid er[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: Providers Listed By Protocol: {imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: !anyLoaded
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: not loading resource: /META-INF/javamail.address.map
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: java.io.FileNotFoundException: C:\Program Files\IBM\SDP70\runtimes\base_v61\java\jre\lib\jav amail.address.map (The system cannot find the file specified.)
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O *** In SessionFactory.getObjectInstance,
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O The default SessionAuthenticator is based on:
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O store_user = null
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O store_pw = ****
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O *** In SessionFactory.getObjectInstance, PasswordAuthentication is set for transport, with
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O trans_user = burked
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O trans_pw = ****
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O trans_url = smtpab://burked@littlemuscle.mul.ie.ibm.com
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O *** In SessionFactory.getObjectInstance, parameters in the new session:
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O mail.smtpab.host="littlemuscle.mul.ie.ibm.com"
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O mail.smtpab.class="com.sun.mail.smtp.SMTPTransport"
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O mail.debug="true"
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O mail.transport.protocol="smtpab"
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O mail.smtpab.user="burked"
[10/08/07 09:38:21:812 IST] 00000024 ServletWrappe I SRVE0242I: [mailsession.ear] [/MailSessionPrototype] [MailServlet]: Initialization successful.
[10/08/07 09:38:21:890 IST] 00000024 SystemOut O DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
[10/08/07 09:38:21:890 IST] 00000024 SystemOut O DEBUG SMTP: useEhlo true, useAuth false

If I create the provider using the file /WEB-INF/javamail.providers containing
protocol=smtpab; type=transport; class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc;


[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPTransport=javax.mail.Provid er[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
[10/08/07 09:38:21:812 IST] 00000024 SystemOut O DEBUG: Providers Listed By Protocol: {imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtpab=javax.mail.Provider[TRANSPORT,smtpab,com.sun.mail.smtp.SMTPTransport,S un Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}