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.
-
JDPSendMail(String)
- Creates an Email Sender.
-
closePort()
- Close the port to the Mail Server.
-
mailMessage(String, String, String, String)
- Sends a message.
-
mailMessage(String, String, String, String, String)
- Sends a message.
-
mailMessage(String, String, String, String, String, String)
- Sends a message.
-
mailMessage(String, String, String, String, String, String, String)
- Sends a message.
JDPSendMail
public JDPSendMail(String host)
- Creates an Email Sender.
- Parameters:
- host - the domain name of the mail server (eg. 'mail.myserver.com').
closePort
public boolean closePort()
- Close the port to the Mail Server.
- Returns:
- whether the port is successfully closed.
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.
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.
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.
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.