kotkabeans
Class Mail

java.lang.Object
  |
  +--kotkabeans.Mail

public class Mail
extends java.lang.Object

class is used to send e-mail. For example, after adding a new user mail is sent to respective person.


Constructor Summary
Mail()
           
 
Method Summary
static java.lang.String removeUmlauts(java.lang.String original)
           
static void sendMail(int from, int paramid, int to, java.lang.String subject, java.lang.String msg)
          Sends given message to given person.
static void sendMail(int from, int to, java.lang.String subject, java.lang.String msg)
          Sends given message to given person.
static boolean sendMail(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String msg)
          Sends given message to given e-mail address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mail

public Mail()
Method Detail

removeUmlauts

public static java.lang.String removeUmlauts(java.lang.String original)

sendMail

public static boolean sendMail(java.lang.String from,
                               java.lang.String to,
                               java.lang.String subject,
                               java.lang.String msg)
Sends given message to given e-mail address. Unfortunately contains bugs at this time.

Parameters:
to - receivers e-mail address
subject - topic of the message
msg - body of the message
Returns:
Returns true if sending succeeds, otherwise false

sendMail

public static void sendMail(int from,
                            int to,
                            java.lang.String subject,
                            java.lang.String msg)
                     throws java.lang.Exception
Sends given message to given person. Sender and receiver are represented as ids.

Parameters:
from - sender's id
to - receivers ids
subject - topic of the message
msg - body of the message
Returns:
Returns true if sending succeeds, otherwise false
java.lang.Exception

sendMail

public static void sendMail(int from,
                            int paramid,
                            int to,
                            java.lang.String subject,
                            java.lang.String msg)
                     throws java.lang.Exception
Sends given message to given person. Sender and receiver are represented as ids. In case sender has many email addresses, we use the the one given in parameter.

Parameters:
from - sender's id
paramid - senders personparameterid representing email address
to - receivers ids
subject - topic of the message
msg - body of the message
Returns:
Returns true if sending succeeds, otherwise false
java.lang.Exception