Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## it.gotoandplay.smartfoxserver.lib
Class MailManager

    java.lang.Object
      it.gotoandplay.smartfoxserver.lib.MailManager

    public class MailManager

extends java.lang.Object

The MailManager class provides a simple tool to send emails from server side extensions.
It uses an external SMTP server that can be configured from the main SmartFoxServer configuration file

Field Summary
`static java.lang.String` | `MAIL_HOST`
`static java.lang.String` | `MAIL_PASS`
`static java.lang.String` | `MAIL_PORT`
`static java.lang.String` | `MAIL_PROTOCOL`
`static int` | `MAIL_THREADS`
`static java.lang.String` | `MAIL_USER`

Method Summary
`static MailManager` | `getInstance()` Get the Mail Manager instance
`boolean` | `sendMail(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String mailMsg)` Send an email message

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAIL_HOST

    public static java.lang.String MAIL_HOST

### MAIL_USER

    public static java.lang.String MAIL_USER

### MAIL_PASS

    public static java.lang.String MAIL_PASS

### MAIL_PORT

    public static java.lang.String MAIL_PORT

### MAIL_THREADS

    public static int MAIL_THREADS

### MAIL_PROTOCOL

    public static final java.lang.String MAIL_PROTOCOL

See Also:
  Constant Field Values

Method Detail

### getInstance

    public static MailManager getInstance()

  Get the Mail Manager instance

  Returns:
    the mail manager object

### sendMail

    public boolean sendMail(java.lang.String from,
                            java.lang.String to,
                            java.lang.String subject,
                            java.lang.String mailMsg)

  Send an email message

  Parameters:
    `from` - email sender
    `to` - email recipient
    `subject` - email subject
    `mailMsg` - email message (text or html formatted)
  Throws:
    `javax.mail.MessagingException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD