1   /*
2    * Created by IntelliJ IDEA.
3    * User: owen
4    * Date: Dec 9, 2002
5    * Time: 2:45:14 PM
6    * CVS Revision: $Revision: 1.17 $
7    * Last CVS Commit: $Date: 2005/09/13 01:21:55 $
8    * Author of last CVS Commit: $Author: jturner $
9    * To change this template use Options | File Templates.
10   */
11  package com.atlassian.mail.server;
12  
13  import com.atlassian.mail.Email;
14  import com.atlassian.mail.MailException;
15  
16  import java.io.PrintStream;
17  
18  public interface SMTPMailServer extends MailServer
19  {
20      String DEFAULT_SMTP_PORT = "25";
21  
22      String getDefaultFrom();
23  
24      void setDefaultFrom(String from);
25  
26      String getPrefix();
27  
28      void setPrefix(String prefix);
29  
30      boolean isSessionServer();
31  
32      void setSessionServer(boolean sessionServer);
33  
34      String getJndiLocation();
35  
36      void setJndiLocation(String jndiLocation);
37  
38      public boolean isRemovePrecedence();
39  
40      public void setRemovePrecedence(boolean precedence);
41  
42      void send(Email email) throws MailException;
43  
44      void quietSend(Email email) throws MailException;
45  
46      String getSmtpPort();
47  
48      void setSmtpPort(String smtpPort);
49  
50      /**
51       * Enable or disable SMTP-level logging.
52       *
53       * @param debug Turn debugging on or off
54       */
55      void setDebug(boolean debug);
56  
57      /**
58       * If debug is enabled, output will go to this stream.
59      * @param debugStream An optional stream to send debug messages to. If null, System.out is used.
60      */
61      void setDebugStream(PrintStream debugStream);
62  
63      /**
64       * Whether SMTP-level logging is enabled.
65       */
66      boolean getDebug();
67  
68      /**
69       * Where debug logs currently go to.
70       */
71      PrintStream getDebugStream();
72  }