quintonm 2003/03/17 13:50:10
Modified: email/xdocs examples.xml
Log:
Added docs on using authentication
Revision Changes Path
1.2 +21 -1 jakarta-commons-sandbox/email/xdocs/examples.xml
Index: examples.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/email/xdocs/examples.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- examples.xml 10 Mar 2003 06:31:46 -0000 1.1
+++ examples.xml 17 Mar 2003 21:50:10 -0000 1.2
@@ -158,6 +158,26 @@
will be written to <code>System.out</code>.
</p>
</section>
+ <section name="Authentication">
+ <p>
+ If you need to authenticate to your SMTP server, you can call the
+ <code>setAuthentication(userName,password)</code> method before sending
+ your email. This will create an instance of
+ <code>DefaultAuthenticator</code> which will be used by the JavaMail
+ API when the email is sent. Your server must support RFC2554 in
+ order for this to work.
+ </p>
+ <p>
+ You can perform a more complex authentication method such as displaying
+ a dialog box to the user by creating a subclass of the
+ <code>javax.mail.Authenticator</code> object. You will need to
+ override the <code>getPasswordAuthentication()</code> method where
+ you will handle collecting the user's information. To make use of
+ your new <code>Authenticator</code> class, use the
+ <code>Email.setAuthenticator</code> method.
+
+ </p>
+ </section>
</body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]