jodd.mail
Class SendMail

java.lang.Object
  extended byjodd.mail.SendMail

public class SendMail
extends java.lang.Object

Sends e-mails in an easy way.

To Do:
i18n

Constructor Summary
SendMail()
           
 
Method Summary
static SmtpServer getDefaultSmtpServer()
          Returns default SMTP server.
static void send(Email email)
          Sends an email through default SMTP server.
static void send(Email email, SmtpServer smtpServer)
          Sends an email through SMTP server.
static void setDefaultSmtpServer(SmtpServer server)
          Sets default SMTP server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendMail

public SendMail()
Method Detail

setDefaultSmtpServer

public static void setDefaultSmtpServer(SmtpServer server)
Sets default SMTP server.

Parameters:
server - default SMTP server

getDefaultSmtpServer

public static SmtpServer getDefaultSmtpServer()
Returns default SMTP server.

Returns:
default SMTP server

send

public static void send(Email email)
                 throws javax.mail.MessagingException
Sends an email through default SMTP server.

Parameters:
email - email
Throws:
javax.mail.MessagingException

send

public static void send(Email email,
                        SmtpServer smtpServer)
                 throws javax.mail.MessagingException
Sends an email through SMTP server.

Parameters:
email - email
smtpServer - SMTP server or null for default one
Throws:
javax.mail.MessagingException


Jodd v0.24.5 Javadoc