Class JDPSendMail

java.lang.Object
   |
   +----JDPSendMail

public class JDPSendMail
extends Object
Class JDPSendMail represents a simple Email class for sending email to an SMTP mail server.


Constructor Index

 o JDPSendMail(String)
Creates an Email Sender.

Method Index

 o closePort()
Close the port to the Mail Server.
 o mailMessage(String, String, String, String)
Sends a message.
 o mailMessage(String, String, String, String, String)
Sends a message.
 o mailMessage(String, String, String, String, String, String)
Sends a message.
 o mailMessage(String, String, String, String, String, String, String)
Sends a message.

Constructors

 o JDPSendMail
 public JDPSendMail(String host)
Creates an Email Sender.

Parameters:
host - the domain name of the mail server (eg. 'mail.myserver.com').

Methods

 o closePort
 public boolean closePort()
Close the port to the Mail Server.

Returns:
whether the port is successfully closed.
 o mailMessage
 public boolean mailMessage(String receiver,
                            String sender,
                            String cc,
                            String subject,
                            String message,
                            String attachment)
Sends a message.

Parameters:
receiver - the to address for the email.
sender - the return address for the email.
cc - the cc addresses for the email.
subject - the message subject.
message - the actual message.
attachment - the path (on the server) to the attachment to send. Append ':u' to the file name if you want the attachment to be uuencoded.
Returns:
whether the message was successfully sent.
 o mailMessage
 public boolean mailMessage(String receiver,
                            String sender,
                            String cc,
                            String bcc,
                            String subject,
                            String message,
                            String attachment)
Sends a message.

Parameters:
receiver - the to address for the email.
sender - the return address for the email.
cc - the cc addresses for the email.
bcc - the bcc addresses for the email.
subject - the message subject.
message - the actual message.
attachment - the path (on the server) to the attachment to send. Append ':u' to the file name if you want the attachment to be uuencoded.
Returns:
whether the message was successfully sent.
 o mailMessage
 public boolean mailMessage(String receiver,
                            String sender,
                            String subject,
                            String message)
Sends a message.

Parameters:
receiver - the to address for the email.
sender - the return address for the email.
subject - the message subject.
message - the actual message.
Returns:
whether the message was successfully sent.
 o mailMessage
 public boolean mailMessage(String receiver,
                            String sender,
                            String subject,
                            String message,
                            String attachment)
Sends a message.

Parameters:
receiver - the to address for the email.
sender - the return address for the email.
subject - the message subject.
message - the actual message.
attachment - the path (on the server) to the attachment to send. Append ':u' to the file name if you want the attachment to be uuencoded.
Returns:
whether the message was successfully sent.