FileDocCategorySizeDatePackage
MailServer.javaAPI DocApache James 2.3.14863Fri Jan 12 12:56:26 GMT 2007org.apache.james.services

MailServer

public interface MailServer
The interface for Phoenix blocks to the James MailServer
version
This is $Revision: 494012 $

Fields Summary
String
ROLE
The component role used by components implementing this service
String
MDA
Reserved user name for the mail delivery agent for multi-user mailboxes
String
ALL
Reserved user name meaning all users for multi-user mailboxes
Constructors Summary
Methods Summary
public booleanaddUser(java.lang.String userName, java.lang.String password)
Adds a new user to the mail system with userName. For POP3 style stores this may only involve adding the user to the UsersStore.

param
sender - the name of the user
return
a reference to an initialised mailbox
deprecated
addUser should not be considered a property of a MailServer We could have readonly userbases providing full MailServer implementations. Look at the UsersRepository.addUser(username, password) method.

public java.lang.StringgetId()
Generate a new identifier/name for a mail being processed by this server.

return
the new identifier

public MailRepositorygetUserInbox(java.lang.String userName)
Retrieve the primary mailbox for userName. For POP3 style stores this is their (sole) mailbox.

param
sender - the name of the user
return
a reference to an initialised mailbox

public booleanisLocalServer(java.lang.String serverName)
Checks if a server is serviced by mail context

param
serverName - name of server.
return
true if server is local, i.e. serviced by this mail context

public voidsendMail(org.apache.mailet.MailAddress sender, java.util.Collection recipients, javax.mail.internet.MimeMessage msg)
Pass a MimeMessage to this MailServer for processing

param
sender - the sender of the message
param
recipients - a Collection of String objects of recipients
param
msg - the MimeMessage of the headers and body content of the outgoing message
throws
MessagingException - if the message fails to parse
deprecated
You can use MailetContext service for this purpose

public voidsendMail(org.apache.mailet.MailAddress sender, java.util.Collection recipients, java.io.InputStream msg)
Pass a MimeMessage to this MailServer for processing

param
sender - the sender of the message
param
recipients - a Collection of String objects of recipients
param
msg - an InputStream containing the headers and body content of the outgoing message
throws
MessagingException - if the message fails to parse
deprecated
You can use MailetContext service for this purpose

public voidsendMail(org.apache.mailet.Mail mail)
Pass a Mail to this MailServer for processing

param
mail the Mail to be processed
throws
MessagingException

public voidsendMail(javax.mail.internet.MimeMessage message)
Pass a MimeMessage to this MailServer for processing

param
message the message
throws
MessagingException
deprecated
You can use MailetContext service for this purpose