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

## com.ejie.r01f.mail
Class MailComposer

    java.lang.Object
      com.ejie.r01f.mail.MailComposer

public class MailComposer
extends java.lang.Object

Clase que encapsula funcionalidad para el envio de correos electrónicos desde Java Ejemplo de utilización: MailComposer mComposer = new MailComposer(smtpHost); mComposer.sendMessage(from,to,subject,CONTENT_TYPE_TEXT,"hola mundo",null);

Field Summary
`static java.lang.String` | `CONTENT_TYPE_HTML`
`static java.lang.String` | `CONTENT_TYPE_TEXT`

Constructor Summary
`MailComposer()` Constructor vacio
`MailComposer(java.lang.String smtpHost, boolean debug)` Constructor en base al host

Method Summary
`java.lang.String` | `getSMTPHost()` Devuelve el nombre del host smtp
`void` | `sendMessage(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String messageContentType, java.lang.String messageText, java.lang.String[] attachListFileNames)` Envia un mensaje smtp.
`void` | `setSMTPHost(java.lang.String host)` Establece el nombre del host smtp

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

Field Detail

### CONTENT_TYPE_HTML

    public static final java.lang.String CONTENT_TYPE_HTML

See Also:
  Constant Field Values

### CONTENT_TYPE_TEXT

    public static final java.lang.String CONTENT_TYPE_TEXT

See Also:
  Constant Field Values

Constructor Detail

### MailComposer

    public MailComposer()

  Constructor vacio

### MailComposer

    public MailComposer(java.lang.String smtpHost,
                        boolean debug)

  Constructor en base al host

Parameters:
  `smtpHost` - nombre del host
  `debug` - true si hay que habilitar el debug del java mail

Method Detail

### sendMessage

    public void sendMessage(java.lang.String from,
                            java.lang.String to,
                            java.lang.String subject,
                            java.lang.String messageContentType,
                            java.lang.String messageText,
                            java.lang.String[] attachListFileNames)
                     throws javax.mail.internet.AddressException,
                            javax.mail.MessagingException

  Envia un mensaje smtp. OJO!!! Utilización MailComposer mComposer = new MailComposer(smtpHost); mComposer.sendMessage(from,to,subject,CONTENT_TYPE_TEXT,"hola mundo",null);

  Throws:
    `javax.mail.internet.AddressException`
    `javax.mail.MessagingException`

### getSMTPHost

    public java.lang.String getSMTPHost()

  Devuelve el nombre del host smtp

  Returns:

### setSMTPHost

    public void setSMTPHost(java.lang.String host)

  Establece el nombre del host smtp

  Parameters:
    `host` - nombre del host smtp

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