org.codehaus.plexus.mailsender
Class AbstractMailSender

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.codehaus.plexus.mailsender.AbstractMailSender
All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled, MailSender
Direct Known Subclasses:
AbstractJavamailMailSender, MockMailSender, SimpleMailSender

public abstract class AbstractMailSender
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements MailSender

Version:
$Id: AbstractMailSender.java 5585 2007-02-05 21:05:01Z evenisse $
Author:
Trygve Laugstøl, Emmanuel Venisse

Field Summary
static int DEFAULT_SMTP_PORT
           
 
Fields inherited from interface org.codehaus.plexus.mailsender.MailSender
ROLE
 
Constructor Summary
AbstractMailSender()
           
 
Method Summary
 String getPassword()
           
 String getSmtpHost()
           
 int getSmtpPort()
           
 String getUsername()
           
 boolean isDebugMode()
           
 boolean isSslMode()
           
 boolean isTlsEnabled()
           
 void send(String subject, String content, String toMailbox, String toName, String fromMailbox, String fromName)
          Send a mail message.
 void send(String subject, String content, String toMailbox, String toName, String fromMailbox, String fromName, Map headers)
          Send a mail message.
 void setDebugMode(boolean debugMode)
           
 void setPassword(String pass)
           
 void setSmtpHost(String host)
           
 void setSmtpPort(int port)
           
 void setSslMode(boolean sslEnabled)
           
 void setSslMode(boolean sslEnabled, boolean tlsEnabled)
           
 void setUsername(String name)
           
 void verify(MailMessage message)
          Verify the content of a mail message.
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.plexus.mailsender.MailSender
send
 

Field Detail

DEFAULT_SMTP_PORT

public static final int DEFAULT_SMTP_PORT
See Also:
Constant Field Values
Constructor Detail

AbstractMailSender

public AbstractMailSender()
Method Detail

getSmtpHost

public String getSmtpHost()
Specified by:
getSmtpHost in interface MailSender

setSmtpHost

public void setSmtpHost(String host)
Specified by:
setSmtpHost in interface MailSender

getSmtpPort

public int getSmtpPort()
Specified by:
getSmtpPort in interface MailSender

setSmtpPort

public void setSmtpPort(int port)
Specified by:
setSmtpPort in interface MailSender

getUsername

public String getUsername()
Specified by:
getUsername in interface MailSender

setUsername

public void setUsername(String name)
Specified by:
setUsername in interface MailSender

getPassword

public String getPassword()
Specified by:
getPassword in interface MailSender

setPassword

public void setPassword(String pass)
Specified by:
setPassword in interface MailSender

isSslMode

public boolean isSslMode()
Specified by:
isSslMode in interface MailSender

isTlsEnabled

public boolean isTlsEnabled()
Specified by:
isTlsEnabled in interface MailSender

setSslMode

public void setSslMode(boolean sslEnabled)
Specified by:
setSslMode in interface MailSender

setSslMode

public void setSslMode(boolean sslEnabled,
                       boolean tlsEnabled)
Specified by:
setSslMode in interface MailSender

isDebugMode

public boolean isDebugMode()
Specified by:
isDebugMode in interface MailSender

setDebugMode

public void setDebugMode(boolean debugMode)
Specified by:
setDebugMode in interface MailSender

send

public void send(String subject,
                 String content,
                 String toMailbox,
                 String toName,
                 String fromMailbox,
                 String fromName)
          throws MailSenderException
Description copied from interface: MailSender
Send a mail message.

Specified by:
send in interface MailSender
Throws:
MailSenderException

send

public void send(String subject,
                 String content,
                 String toMailbox,
                 String toName,
                 String fromMailbox,
                 String fromName,
                 Map headers)
          throws MailSenderException
Description copied from interface: MailSender
Send a mail message.

Specified by:
send in interface MailSender
Throws:
MailSenderException

verify

public void verify(MailMessage message)
            throws MailSenderException
Description copied from interface: MailSender
Verify the content of a mail message.

Specified by:
verify in interface MailSender
Throws:
MailSenderException


Copyright © 2001-2012 Codehaus. All Rights Reserved.