[jboss-jira] [JBoss JIRA] Closed: (JBMAIL-38) JCA adaptor for incoming and outgoing mail using JBoss Mail Server
Andrew Oliver (JIRA)
jira-events at jboss.com
Wed Dec 13 19:27:04 EST 2006
[ http://jira.jboss.com/jira/browse/JBMAIL-38?page=all ]
Andrew Oliver closed JBMAIL-38.
-------------------------------
Resolution: Won't Fix
Assignee: (was: Andrew Oliver)
> JCA adaptor for incoming and outgoing mail using JBoss Mail Server
> ------------------------------------------------------------------
>
> Key: JBMAIL-38
> URL: http://jira.jboss.com/jira/browse/JBMAIL-38
> Project: JBoss Mail ** Closed - moved to http://buni.org **
> Issue Type: Feature Request
> Reporter: Andrew Oliver
> Priority: Critical
> Original Estimate: 1 week
> Remaining Estimate: 1 week
>
> A JCA adaptor for generic use of the mail server should be created for both sending and retrieving mails.
> The following are conceptual interfaces.
> Context ctx = new InitialContext();
> MailServer svr = (MailServer)ctx.lookup("java://mail/Server");
> if (svr.checkMail();) { // current associated JAAS user is assumed
> int ids[] = svr.getMailIds();
>
> for (int k =0; k < ids.length; k++) {
> System.out.println("reading mail "+ids[k]);
> Mail mail = srv.getMail(ids[k]);
> MailHeaders headers = mail.getHeaders();
> InputStream stream = mail.getBody();
> printHeaders(headers);
> printBody(stream);
> }
> }
> MailUserContext muc = new MailUserContext("user","password");
> svr.setUser(muc);
> if (svr.checkMail(muc)) {
> int ids[] = svr.getMailIds("foldername");
> ...
> }
> Mail[] mail = svr.findMail("where SUBJECT like 'I like AOP' and FROM like 'bburke');
> For the first edition I do not want to support searching in bodies.
> Mail mail = new Mail();
> mail.setContentType("text/plain");
> mail.setBody("I like cheese.");
> mail.setTo("<you at wherever.com>");
> mail.setFrom("<me at here.com>"); // should follow validate-identity rules (when enabled) for validating the JAAS user against the From.
> svr.sendMail(mail);
> svr.fetch("folder"); // force a fetchmail to happen for the current authenticated user and block until it returns (if the user/folder aren't configured to fetchmail from external server then this should probably return without error)
> svr.fetchAsynch("folder"); //suggest that the server run a fetchmail and return
> For a later revision I want an inbound/event driven version as well.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list