IP*Works! SSL V6

ipworksssl
Class Filemailers

java.lang.Object
  |
  +--ipworksssl.Filemailers

public class Filemailers
extends java.lang.Object

The FileMailerS bean is used to send emails with file attachments.

The FileMailerS bean is the SSL-enabled equivalent (RFC 2487) of the IP*Works! FileMailer bean. The main difference is the introduction of a set of new configuration settings, properties and events that deal with SSL security. TheSSLProviderconfiguration setting chooses a security provider subsystem. TheSSLEnabledProtocolsandSSLCipherStrengthconfiguration settings determine which protocols are enabled and at what security level. The SSLCertStore , SSLCertSubject , and SSLCertEncoded properties are used to select a client certificate if the server is requesting client authentication. TheSSLSecurityFlagsconfiguration setting, together with the SSLServerAuthentication event allow you to check the server identity and other security attributes. Finally, the SSLStatus event provides information about the SSL handshake.

The bean sends a message (provided in MessageText ) and a total of AttachmentCount attachments. The attachment filenames are specified in the Attachments property.

The recipients are specified by the SendTo , Cc , and BCc properties, and the message subject by the Subject property.

Once all the appropriate properties have been set call the Send method and your message will be sent to its intended recipient(s).

Other SMTP headers may be specified through the OtherHeaders property. Information about interaction with the server is provided via the PITrail event.


Field Summary
static int amCRAMMD5
           
static int amUserPassword
           
static int epNonUrgent
           
static int epNormal
           
static int epUnspecified
           
static int epUrgent
           
static int esCompanyConfidential
           
static int esPersonal
           
static int esPrivate
           
static int esUnspecified
           
static int fwNone
           
static int fwSOCKS4
           
static int fwSOCKS5
           
static int fwTunnel
           
static int miHigh
           
static int miLow
           
static int miNormal
           
static int miUnspecified
           
static int sslAutomatic
           
static int sslExplicit
           
static int sslImplicit
           
static int sslNone
           
static int sstMachine
           
static int sstPEMKey
           
static int sstPFXBlob
           
static int sstPFXFile
           
static int sstUser
           
 
Constructor Summary
Filemailers()
           
 
Method Summary
 void addAttachment(java.lang.String fileName)
          Adds FileName as an attachment.
 void addFilemailersEventListener(FilemailersEventListener l)
           
 java.lang.String config(java.lang.String configurationString)
          Sets or retrieves a beanconfiguration setting.
 void connect()
          Connects to the mail relay and sends the SMTP HELO command.
 void disconnect()
          Disconnect from the SMTP server.
 void doEvents()
          Processes events from the internal message queue.
 int getAttachmentCount()
          The number of file attachments to the message.
 java.lang.String getAttachments(int attachmentIndex)
          The paths of files to attach to the message.
 int getAuthMechanism()
          The authentication mechanism to be used when connecting to the mail server.
 java.lang.String getBCc()
          A comma separated list of addresses for blind carbon copies (optional).
 java.lang.String getCc()
          A comma separated list of addresses for carbon copies (optional).
 java.lang.String getDeliveryNotificationTo()
          Email address to send a delivery notification to.
 java.lang.String getFirewallHost()
          Name or IP address of firewall (optional).
 java.lang.String getFirewallPassword()
          A password if authentication is to be used when connecting through the firewall.
 int getFirewallPort()
          Port of the firewall to connect to.
 int getFirewallType()
          Determines the type of firewall to connect through.
 java.lang.String getFirewallUser()
          A user name if authentication is to be used connecting through a firewall.
 java.lang.String getFrom()
          The email address of the sender (required).
 int getImportance()
          Importance of the mail message (optional).
 java.lang.String getLastReply()
          The last reply from the server.
 java.lang.String getLocalHost()
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 int getMailPort()
          The server port for SMTP (default 25).
 java.lang.String getMailServer()
          The name or address of a mail server (mail relay).
 java.lang.String getMessageDate()
          The Date of the mail message (optional).
 java.lang.String getMessageId()
          The MessageId for the message.
 java.lang.String getMessageText()
          The full text of the message to send (without headers).
 java.lang.String getOtherHeaders()
          An RFC 822 compliant string consisting of extra headers.
 java.lang.String getPassword()
          A login password to login with in the MailServer .
 int getPriority()
          Priority of the mail message (optional).
 java.lang.String getReadReceiptTo()
          Email address to send a read receipt to.
 java.lang.String getReplyTo()
          A mail address to reply to (optional).
 java.lang.String getSendTo()
          A comma separated list of addresses for destinations (required).
 int getSensitivity()
          Sensitivity of the mail message (optional).
 byte[] getSSLAcceptServerCert()
          Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.
 byte[] getSSLCertEncoded()
          The SSL certificate (PEM/base64 encoded).
 byte[] getSSLCertStore()
          The name of the certificate store for the client certificate.
 java.lang.String getSSLCertStorePassword()
          The password for the certificate store (if any).
 int getSSLCertStoreType()
          The type of certificate store for the client certificate.
 java.lang.String getSSLCertSubject()
          The subject of the certificate used for client authentication.
 byte[] getSSLServerCert()
          The server certificate for the last established connection.
 java.lang.String getSSLServerCertStatus()
          The verification status of the server certificate for the last established connection.
 int getSSLStartMode()
          Determines how the bean starts the SSL negotiation.
 java.lang.String getSubject()
          The subject of the mail message (optional).
 int getTimeout()
          A timeout for the bean.
 java.lang.String getUser()
          A user id to login as in the MailServer .
 void interrupt()
          Interrupt the current method.
 boolean isConnected()
          Shows whether the bean is connected.
 boolean isIdle()
          The current status of the component.
 void processQueue(java.lang.String queueDir)
          Sends the messages which have previously been queued into QueueDir .
 java.lang.String queue(java.lang.String queueDir)
          Queues the message into QueueDir .
 void removeFilemailersEventListener(FilemailersEventListener l)
           
 void resetHeaders()
          Resets all the message headers to empty.
 void send()
          Send the current message and MIME encoded attachment.
 void setAttachmentCount(int attachmentCount)
          The number of file attachments to the message.
 void setAttachments(int attachmentIndex, java.lang.String attachments)
          The paths of files to attach to the message.
 void setAuthMechanism(int authMechanism)
          The authentication mechanism to be used when connecting to the mail server.
 void setBCc(java.lang.String BCc)
          A comma separated list of addresses for blind carbon copies (optional).
 void setCc(java.lang.String cc)
          A comma separated list of addresses for carbon copies (optional).
 void setCommand(java.lang.String command)
          Can be used to send additional commands directly to the server.
 void setConnected(boolean connected)
          Shows whether the bean is connected.
 void setDeliveryNotificationTo(java.lang.String deliveryNotificationTo)
          Email address to send a delivery notification to.
 void setFirewallHost(java.lang.String firewallHost)
          Name or IP address of firewall (optional).
 void setFirewallPassword(java.lang.String firewallPassword)
          A password if authentication is to be used when connecting through the firewall.
 void setFirewallPort(int firewallPort)
          Port of the firewall to connect to.
 void setFirewallType(int firewallType)
          Determines the type of firewall to connect through.
 void setFirewallUser(java.lang.String firewallUser)
          A user name if authentication is to be used connecting through a firewall.
 void setFrom(java.lang.String from)
          The email address of the sender (required).
 void setImportance(int importance)
          Importance of the mail message (optional).
 void setLocalHost(java.lang.String localHost)
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 void setMailPort(int mailPort)
          The server port for SMTP (default 25).
 void setMailServer(java.lang.String mailServer)
          The name or address of a mail server (mail relay).
 void setMessageDate(java.lang.String messageDate)
          The Date of the mail message (optional).
 void setMessageId(java.lang.String messageId)
          The MessageId for the message.
 void setMessageText(java.lang.String messageText)
          The full text of the message to send (without headers).
 void setOtherHeaders(java.lang.String otherHeaders)
          An RFC 822 compliant string consisting of extra headers.
 void setPassword(java.lang.String password)
          A login password to login with in the MailServer .
 void setPriority(int priority)
          Priority of the mail message (optional).
 void setReadReceiptTo(java.lang.String readReceiptTo)
          Email address to send a read receipt to.
 void setReplyTo(java.lang.String replyTo)
          A mail address to reply to (optional).
 void setSendTo(java.lang.String sendTo)
          A comma separated list of addresses for destinations (required).
 void setSensitivity(int sensitivity)
          Sensitivity of the mail message (optional).
 void setSSLAcceptServerCert(byte[] SSLAcceptServerCert)
          Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.
 void setSSLCertEncoded(byte[] SSLCertEncoded)
          The SSL certificate (PEM/base64 encoded).
 void setSSLCertStore(byte[] SSLCertStore)
          The name of the certificate store for the client certificate.
 void setSSLCertStorePassword(java.lang.String SSLCertStorePassword)
          The password for the certificate store (if any).
 void setSSLCertStoreType(int SSLCertStoreType)
          The type of certificate store for the client certificate.
 void setSSLCertSubject(java.lang.String SSLCertSubject)
          The subject of the certificate used for client authentication.
 void setSSLStartMode(int SSLStartMode)
          Determines how the bean starts the SSL negotiation.
 void setSubject(java.lang.String subject)
          The subject of the mail message (optional).
 void setTimeout(int timeout)
          A timeout for the bean.
 void setUser(java.lang.String user)
          A user id to login as in the MailServer .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

amUserPassword

public static final int amUserPassword
See Also:
Constant Field Values

amCRAMMD5

public static final int amCRAMMD5
See Also:
Constant Field Values

fwNone

public static final int fwNone
See Also:
Constant Field Values

fwTunnel

public static final int fwTunnel
See Also:
Constant Field Values

fwSOCKS4

public static final int fwSOCKS4
See Also:
Constant Field Values

fwSOCKS5

public static final int fwSOCKS5
See Also:
Constant Field Values

miUnspecified

public static final int miUnspecified
See Also:
Constant Field Values

miHigh

public static final int miHigh
See Also:
Constant Field Values

miNormal

public static final int miNormal
See Also:
Constant Field Values

miLow

public static final int miLow
See Also:
Constant Field Values

epUnspecified

public static final int epUnspecified
See Also:
Constant Field Values

epNormal

public static final int epNormal
See Also:
Constant Field Values

epUrgent

public static final int epUrgent
See Also:
Constant Field Values

epNonUrgent

public static final int epNonUrgent
See Also:
Constant Field Values

esUnspecified

public static final int esUnspecified
See Also:
Constant Field Values

esPersonal

public static final int esPersonal
See Also:
Constant Field Values

esPrivate

public static final int esPrivate
See Also:
Constant Field Values

esCompanyConfidential

public static final int esCompanyConfidential
See Also:
Constant Field Values

sstUser

public static final int sstUser
See Also:
Constant Field Values

sstMachine

public static final int sstMachine
See Also:
Constant Field Values

sstPFXFile

public static final int sstPFXFile
See Also:
Constant Field Values

sstPFXBlob

public static final int sstPFXBlob
See Also:
Constant Field Values

sstPEMKey

public static final int sstPEMKey
See Also:
Constant Field Values

sslAutomatic

public static final int sslAutomatic
See Also:
Constant Field Values

sslImplicit

public static final int sslImplicit
See Also:
Constant Field Values

sslExplicit

public static final int sslExplicit
See Also:
Constant Field Values

sslNone

public static final int sslNone
See Also:
Constant Field Values
Constructor Detail

Filemailers

public Filemailers()
Method Detail

getAttachmentCount

public int getAttachmentCount()
The number of file attachments to the message.

The Attachments array contains the file names for the attachments. It contains indexes from 1 to AttachmentCount . The number of attachments is provided by the AttachmentCount property.

Example (Adding an Attachment)

 Control.AddAttachment("C:\\file1.zip")
 Control.AddAttachment("C:\\file2.zip")
 Control.Send() 

is equivalent to:

 Control.AttachmentCount = 2
 Control.Attachments(1) = "C:\\file1.zip"
 Control.Attachments(2) = "C:\\file2.zip"
 Control.Send() 


setAttachmentCount

public void setAttachmentCount(int attachmentCount)
                        throws IPWorksSSLException
The number of file attachments to the message.

The Attachments array contains the file names for the attachments. It contains indexes from 1 to AttachmentCount . The number of attachments is provided by the AttachmentCount property.

Example (Adding an Attachment)

 Control.AddAttachment("C:\\file1.zip")
 Control.AddAttachment("C:\\file2.zip")
 Control.Send() 

is equivalent to:

 Control.AttachmentCount = 2
 Control.Attachments(1) = "C:\\file1.zip"
 Control.Attachments(2) = "C:\\file2.zip"
 Control.Send() 

IPWorksSSLException

getAttachments

public java.lang.String getAttachments(int attachmentIndex)
                                throws IPWorksSSLException
The paths of files to attach to the message.

Set this property to the path of a file on your system that you would like to send as an attachment with your message. The bean will open the file and encode its contents in MIME format.

The Attachments property contains indexes from 1 to AttachmentCount . The number of attachments is provided by the AttachmentCount property.

Example (Adding an Attachment)

 Control.AddAttachment("C:\\file1.zip")
 Control.AddAttachment("C:\\file2.zip")
 Control.Send() 

is equivalent to:

 Control.AttachmentCount = 2
 Control.Attachments(1) = "C:\\file1.zip"
 Control.Attachments(2) = "C:\\file2.zip"
 Control.Send() 

IPWorksSSLException

setAttachments

public void setAttachments(int attachmentIndex,
                           java.lang.String attachments)
                    throws IPWorksSSLException
The paths of files to attach to the message.

Set this property to the path of a file on your system that you would like to send as an attachment with your message. The bean will open the file and encode its contents in MIME format.

The Attachments property contains indexes from 1 to AttachmentCount . The number of attachments is provided by the AttachmentCount property.

Example (Adding an Attachment)

 Control.AddAttachment("C:\\file1.zip")
 Control.AddAttachment("C:\\file2.zip")
 Control.Send() 

is equivalent to:

 Control.AttachmentCount = 2
 Control.Attachments(1) = "C:\\file1.zip"
 Control.Attachments(2) = "C:\\file2.zip"
 Control.Send() 

IPWorksSSLException

getAuthMechanism

public int getAuthMechanism()
The authentication mechanism to be used when connecting to the mail server.

By default, AuthMechanism is amUserPassword (0), and if the User and Password properties are set, the AUTH command is sent to the server for authentication. If AuthMechanism is set to amCRAMMD5 (1), CRAM-MD5 authentication is used instead.


setAuthMechanism

public void setAuthMechanism(int authMechanism)
                      throws IPWorksSSLException
The authentication mechanism to be used when connecting to the mail server.

By default, AuthMechanism is amUserPassword (0), and if the User and Password properties are set, the AUTH command is sent to the server for authentication. If AuthMechanism is set to amCRAMMD5 (1), CRAM-MD5 authentication is used instead.

IPWorksSSLException

getBCc

public java.lang.String getBCc()
A comma separated list of addresses for blind carbon copies (optional).

The BCc property specifies a comma separated list of destinations for blind carbon copies of the mail message. A copy of the message is sent to each destination, but no BCc SMTP header is created containing the destination addresses, so individual recipients never see the list of the other recipients.

The bean will return an error if the MailServer returns an error code about any email address specified in SendTo or Cc but it will only fire an Error event if the same happens with an email address specified in BCc .

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.


setBCc

public void setBCc(java.lang.String BCc)
            throws IPWorksSSLException
A comma separated list of addresses for blind carbon copies (optional).

The BCc property specifies a comma separated list of destinations for blind carbon copies of the mail message. A copy of the message is sent to each destination, but no BCc SMTP header is created containing the destination addresses, so individual recipients never see the list of the other recipients.

The bean will return an error if the MailServer returns an error code about any email address specified in SendTo or Cc but it will only fire an Error event if the same happens with an email address specified in BCc .

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.

IPWorksSSLException

getCc

public java.lang.String getCc()
A comma separated list of addresses for carbon copies (optional).

The Cc property specifies a comma separated list of destinations for carbon copies of the mail message. A copy of the message is sent to each destination, and a Cc SMTP header is created containing the destination addresses. This header is sent to every recipient of the message. If you don't want to copy this information to every recipient, then use blind carbon copies instead (see the description of the BCc ).

The bean will return an error if the MailServer returns an error code about any email address specified in SendTo or Cc but it will only fire an Error event if the same happens with an email address specified in BCc .

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.


setCc

public void setCc(java.lang.String cc)
           throws IPWorksSSLException
A comma separated list of addresses for carbon copies (optional).

The Cc property specifies a comma separated list of destinations for carbon copies of the mail message. A copy of the message is sent to each destination, and a Cc SMTP header is created containing the destination addresses. This header is sent to every recipient of the message. If you don't want to copy this information to every recipient, then use blind carbon copies instead (see the description of the BCc ).

The bean will return an error if the MailServer returns an error code about any email address specified in SendTo or Cc but it will only fire an Error event if the same happens with an email address specified in BCc .

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.

IPWorksSSLException

setCommand

public void setCommand(java.lang.String command)
                throws IPWorksSSLException
Can be used to send additional commands directly to the server.

Check the LastReply property and/or trap the PITrail events coming from the server to get the response.

IPWorksSSLException

isConnected

public boolean isConnected()
Shows whether the bean is connected.

Use this property to determine whether the bean is connected to the remote host or not.


setConnected

public void setConnected(boolean connected)
                  throws IPWorksSSLException
Shows whether the bean is connected.

Use this property to determine whether the bean is connected to the remote host or not.

IPWorksSSLException

getDeliveryNotificationTo

public java.lang.String getDeliveryNotificationTo()
Email address to send a delivery notification to.

When set, a Return-Receipt-To header is added to the message. DeliveryNotificationTo should be set to an email address which should receive the delivery notification.


setDeliveryNotificationTo

public void setDeliveryNotificationTo(java.lang.String deliveryNotificationTo)
                               throws IPWorksSSLException
Email address to send a delivery notification to.

When set, a Return-Receipt-To header is added to the message. DeliveryNotificationTo should be set to an email address which should receive the delivery notification.

IPWorksSSLException

getFirewallHost

public java.lang.String getFirewallHost()
Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost property is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the search is not successful, an error is returned.


setFirewallHost

public void setFirewallHost(java.lang.String firewallHost)
                     throws IPWorksSSLException
Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost property is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the search is not successful, an error is returned.

IPWorksSSLException

getFirewallPassword

public java.lang.String getFirewallPassword()
A password if authentication is to be used when connecting through the firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


setFirewallPassword

public void setFirewallPassword(java.lang.String firewallPassword)
                         throws IPWorksSSLException
A password if authentication is to be used when connecting through the firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.

IPWorksSSLException

getFirewallPort

public int getFirewallPort()
Port of the firewall to connect to.

The TCP port for the FirewallHost . See the description of the FirewallHost property for details.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType property for details.


setFirewallPort

public void setFirewallPort(int firewallPort)
                     throws IPWorksSSLException
Port of the firewall to connect to.

The TCP port for the FirewallHost . See the description of the FirewallHost property for details.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType property for details.

IPWorksSSLException

getFirewallType

public int getFirewallType()
Determines the type of firewall to connect through.

The applicable values are the following:

fwNone (0)
No firewall (default setting).
fwTunnel (1)
Connect through a tunneling proxy. FirewallPort is set to 80.
fwSOCKS4 (2)
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
fwSOCKS5 (3)
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.


setFirewallType

public void setFirewallType(int firewallType)
                     throws IPWorksSSLException
Determines the type of firewall to connect through.

The applicable values are the following:

fwNone (0)
No firewall (default setting).
fwTunnel (1)
Connect through a tunneling proxy. FirewallPort is set to 80.
fwSOCKS4 (2)
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
fwSOCKS5 (3)
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.

IPWorksSSLException

getFirewallUser

public java.lang.String getFirewallUser()
A user name if authentication is to be used connecting through a firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


setFirewallUser

public void setFirewallUser(java.lang.String firewallUser)
                     throws IPWorksSSLException
A user name if authentication is to be used connecting through a firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.

IPWorksSSLException

getFrom

public java.lang.String getFrom()
The email address of the sender (required).

The From property is used to create a From SMTP header. This header identifies the sender of the message. A valid email address is required. Examples of valid addresses are: "Friendly Name" <address@company.com> or address@company.com

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.


setFrom

public void setFrom(java.lang.String from)
             throws IPWorksSSLException
The email address of the sender (required).

The From property is used to create a From SMTP header. This header identifies the sender of the message. A valid email address is required. Examples of valid addresses are: "Friendly Name" <address@company.com> or address@company.com

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.

IPWorksSSLException

isIdle

public boolean isIdle()
The current status of the component.

Idle will be False if the component is currently busy (communicating and/or waiting for an answer), and True at all other times.


getImportance

public int getImportance()
Importance of the mail message (optional).

When set, an Importance header will added to the message.

Importance is an indication to the recipient(s) about how important the message is. The possible values are High (1), Normal (2), and Low (3).


setImportance

public void setImportance(int importance)
                   throws IPWorksSSLException
Importance of the mail message (optional).

When set, an Importance header will added to the message.

Importance is an indication to the recipient(s) about how important the message is. The possible values are High (1), Normal (2), and Low (3).

IPWorksSSLException

getLastReply

public java.lang.String getLastReply()
The last reply from the server.

This is the last reply received from the server. It can be used for information purposes. The same information and more can also be retrieved through the PITrail event.


getLocalHost

public java.lang.String getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.


setLocalHost

public void setLocalHost(java.lang.String localHost)
                  throws IPWorksSSLException
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.

IPWorksSSLException

getMailPort

public int getMailPort()
The server port for SMTP (default 25).

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.

For implicit SSL, use port 465 (please refer to the SSLStartMode property for more information).


setMailPort

public void setMailPort(int mailPort)
                 throws IPWorksSSLException
The server port for SMTP (default 25).

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.

For implicit SSL, use port 465 (please refer to the SSLStartMode property for more information).

IPWorksSSLException

getMailServer

public java.lang.String getMailServer()
The name or address of a mail server (mail relay).

The MailServer property specifies the IP address (IP number in dotted internet format) or Domain Name for a mail relay through which messages will be routed. It is set before a connection is attempted and cannot be changed once a connection is in progress.

The current version of the bean does not provide a default value for the mail relay. You must provide a host name yourself. Generally, any internet host with an SMTP server will suffice (a UNIX host for example), but it is preferable to select a MailServer that is close to the machine sending mail.

If the MailServer property is set to a Domain Name, a DNS request is initiated and upon successful termination of the request, the MailServer property is set to the corresponding address. If the search is not successful, an error is returned.

If the bean is configured to use a SOCKS firewall, the value assigned to this property may be preceded with a "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.


setMailServer

public void setMailServer(java.lang.String mailServer)
                   throws IPWorksSSLException
The name or address of a mail server (mail relay).

The MailServer property specifies the IP address (IP number in dotted internet format) or Domain Name for a mail relay through which messages will be routed. It is set before a connection is attempted and cannot be changed once a connection is in progress.

The current version of the bean does not provide a default value for the mail relay. You must provide a host name yourself. Generally, any internet host with an SMTP server will suffice (a UNIX host for example), but it is preferable to select a MailServer that is close to the machine sending mail.

If the MailServer property is set to a Domain Name, a DNS request is initiated and upon successful termination of the request, the MailServer property is set to the corresponding address. If the search is not successful, an error is returned.

If the bean is configured to use a SOCKS firewall, the value assigned to this property may be preceded with a "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.

IPWorksSSLException

getMessageDate

public java.lang.String getMessageDate()
The Date of the mail message (optional).

If the MessageDate property contains a non-empty string, then a Date SMTP header is created and attached to the message. If not, then the date information is added by the mail relay(s) the message goes through.

Special case: if MessageDate is set to the special value "*", a Date SMTP header reflecting the current date and time is generated when MessageHeaders is computed and the message is sent.

RFC 822 contains detailed date format specifications. An example of a valid date is "Fri, 1 Mar 96 21:24:52 EST".


setMessageDate

public void setMessageDate(java.lang.String messageDate)
                    throws IPWorksSSLException
The Date of the mail message (optional).

If the MessageDate property contains a non-empty string, then a Date SMTP header is created and attached to the message. If not, then the date information is added by the mail relay(s) the message goes through.

Special case: if MessageDate is set to the special value "*", a Date SMTP header reflecting the current date and time is generated when MessageHeaders is computed and the message is sent.

RFC 822 contains detailed date format specifications. An example of a valid date is "Fri, 1 Mar 96 21:24:52 EST".

IPWorksSSLException

getMessageId

public java.lang.String getMessageId()
The MessageId for the message.

When set, the value of MessageId is used as the Message-ID header value of the message. A special value of "*" will automatically generate a random unique id for the message.


setMessageId

public void setMessageId(java.lang.String messageId)
                  throws IPWorksSSLException
The MessageId for the message.

When set, the value of MessageId is used as the Message-ID header value of the message. A special value of "*" will automatically generate a random unique id for the message.

IPWorksSSLException

getMessageText

public java.lang.String getMessageText()
The full text of the message to send (without headers).

The MessageText property contains the full text of the message.

It is advisable that the text contained in this property be a collection of lines with lengths less than or equal to 80 bytes separated by CRLF ("\\r\\n") . The text in the message lines must contain 7-bit characters so that the message can be successfully pass through the multitude of mail systems on the Internet.

The bean automatically escapes lines that start with a "." by adding another as specified in RFC 821. The message text is unescaped by the receiving agent, so the process is fully transparent.


setMessageText

public void setMessageText(java.lang.String messageText)
                    throws IPWorksSSLException
The full text of the message to send (without headers).

The MessageText property contains the full text of the message.

It is advisable that the text contained in this property be a collection of lines with lengths less than or equal to 80 bytes separated by CRLF ("\\r\\n") . The text in the message lines must contain 7-bit characters so that the message can be successfully pass through the multitude of mail systems on the Internet.

The bean automatically escapes lines that start with a "." by adding another as specified in RFC 821. The message text is unescaped by the receiving agent, so the process is fully transparent.

IPWorksSSLException

getOtherHeaders

public java.lang.String getOtherHeaders()
An RFC 822 compliant string consisting of extra headers.

The OtherHeaders property contains a string of headers to be appended to the message headers created from other properties like SendTo , Subject , etc.

The headers must of the format "header: value" as specified in RFC 822. Header lines should be separated by CRLF ("\\r\\n") .

Use this property with caution. If OtherHeaders contains invalid headers, message delivery might not be successful.

The OtherHeaders property is useful for extending the functionality of the bean. A good example is delivery of MIME encoded messages.

SPECIAL CASE: if OtherHeaders starts with an empty line (CRLF), then the value of OtherHeaders is used instead of the normally computed message headers.

Example (Send an Email With Additional Header)

 control.MailServer = "MyServer"
 control.From = "me@server.com"
 control.SendTo = "recipient@server.com"
 control.Subject = "My Subject"
 control.MessageText = "This is the message body"
 control.OtherHeaders = "HeaderName: Headervalue"
 control.Send() 


setOtherHeaders

public void setOtherHeaders(java.lang.String otherHeaders)
                     throws IPWorksSSLException
An RFC 822 compliant string consisting of extra headers.

The OtherHeaders property contains a string of headers to be appended to the message headers created from other properties like SendTo , Subject , etc.

The headers must of the format "header: value" as specified in RFC 822. Header lines should be separated by CRLF ("\\r\\n") .

Use this property with caution. If OtherHeaders contains invalid headers, message delivery might not be successful.

The OtherHeaders property is useful for extending the functionality of the bean. A good example is delivery of MIME encoded messages.

SPECIAL CASE: if OtherHeaders starts with an empty line (CRLF), then the value of OtherHeaders is used instead of the normally computed message headers.

Example (Send an Email With Additional Header)

 control.MailServer = "MyServer"
 control.From = "me@server.com"
 control.SendTo = "recipient@server.com"
 control.Subject = "My Subject"
 control.MessageText = "This is the message body"
 control.OtherHeaders = "HeaderName: Headervalue"
 control.Send() 

IPWorksSSLException

getPassword

public java.lang.String getPassword()
A login password to login with in the MailServer .

If the Password property is set to a non-empty string, then when connecting to the MailServer an AUTH or CRAM-MD5 (depending on the value of AuthMechanism ) command is sent in order to provide authentication information for the user.


setPassword

public void setPassword(java.lang.String password)
                 throws IPWorksSSLException
A login password to login with in the MailServer .

If the Password property is set to a non-empty string, then when connecting to the MailServer an AUTH or CRAM-MD5 (depending on the value of AuthMechanism ) command is sent in order to provide authentication information for the user.

IPWorksSSLException

getPriority

public int getPriority()
Priority of the mail message (optional).

When set, a Priority header will be added to the message. Priority is an indication about the delivery priority of the message. The possible values are epNormal, epUrgent, and epNonUrgent.


setPriority

public void setPriority(int priority)
                 throws IPWorksSSLException
Priority of the mail message (optional).

When set, a Priority header will be added to the message. Priority is an indication about the delivery priority of the message. The possible values are epNormal, epUrgent, and epNonUrgent.

IPWorksSSLException

getReadReceiptTo

public java.lang.String getReadReceiptTo()
Email address to send a read receipt to.

When set, a Disposition-Notification-To header is added to the message. ReadReceiptTo should be set to an email address which should receive the read-receipt.


setReadReceiptTo

public void setReadReceiptTo(java.lang.String readReceiptTo)
                      throws IPWorksSSLException
Email address to send a read receipt to.

When set, a Disposition-Notification-To header is added to the message. ReadReceiptTo should be set to an email address which should receive the read-receipt.

IPWorksSSLException

getReplyTo

public java.lang.String getReplyTo()
A mail address to reply to (optional).

If the ReplyTo property contains a non-empty string, a Reply-To SMTP header is created for the message. This header shows the address to use for replies (useful if this address is different from the one in From ).

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.


setReplyTo

public void setReplyTo(java.lang.String replyTo)
                throws IPWorksSSLException
A mail address to reply to (optional).

If the ReplyTo property contains a non-empty string, a Reply-To SMTP header is created for the message. This header shows the address to use for replies (useful if this address is different from the one in From ).

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.

IPWorksSSLException

getSendTo

public java.lang.String getSendTo()
A comma separated list of addresses for destinations (required).

The SendTo property specifies a comma separated list of destinations for the mail message. A copy of the message is sent to each of them, and a To SMTP header is created containing the destination addresses.

Examples of valid addresses are: "Friendly Name" <address@company.com> or address@company.com

The bean will fail if the MailServer returns an error code about any email address specified in SendTo or Cc but it will silently ignore the error if the same happens with an email address specified in BCc .

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.


setSendTo

public void setSendTo(java.lang.String sendTo)
               throws IPWorksSSLException
A comma separated list of addresses for destinations (required).

The SendTo property specifies a comma separated list of destinations for the mail message. A copy of the message is sent to each of them, and a To SMTP header is created containing the destination addresses.

Examples of valid addresses are: "Friendly Name" <address@company.com> or address@company.com

The bean will fail if the MailServer returns an error code about any email address specified in SendTo or Cc but it will silently ignore the error if the same happens with an email address specified in BCc .

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.

IPWorksSSLException

getSensitivity

public int getSensitivity()
Sensitivity of the mail message (optional).

An indication of how sensitive it is to disclose the message to people other than the recipients of the message. When set, a Sensitivity header will added to the message. Possible values are: esPersonal (1), esPrivate (2), and esCompanyConfidential (3).


setSensitivity

public void setSensitivity(int sensitivity)
                    throws IPWorksSSLException
Sensitivity of the mail message (optional).

An indication of how sensitive it is to disclose the message to people other than the recipients of the message. When set, a Sensitivity header will added to the message. Possible values are: esPersonal (1), esPrivate (2), and esCompanyConfidential (3).

IPWorksSSLException

getSSLAcceptServerCert

public byte[] getSSLAcceptServerCert()
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.

If it finds any issues with the certificate presented by the server, the bean will normally terminate the connection with an error.

You may override this behavior by supplying a value for SSLAcceptServerCert . If the certificate supplied in SSLAcceptServerCert is the same as the certificate presented by the server, then the server certificate is accepted unconditionally, and the connection will continue normally.

Please note that this functionality is provided only for cases where you otherwise know that you are communicating with the right server. If used improperly, these property will create a security breach. Use it at your own risk.


setSSLAcceptServerCert

public void setSSLAcceptServerCert(byte[] SSLAcceptServerCert)
                            throws IPWorksSSLException
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.

If it finds any issues with the certificate presented by the server, the bean will normally terminate the connection with an error.

You may override this behavior by supplying a value for SSLAcceptServerCert . If the certificate supplied in SSLAcceptServerCert is the same as the certificate presented by the server, then the server certificate is accepted unconditionally, and the connection will continue normally.

Please note that this functionality is provided only for cases where you otherwise know that you are communicating with the right server. If used improperly, these property will create a security breach. Use it at your own risk.

IPWorksSSLException

getSSLCertEncoded

public byte[] getSSLCertEncoded()
The SSL certificate (PEM/base64 encoded).

This property is used to assign a specific certificate for SSL client authentication (SSL server authentication in the case of the IPDaemonS bean). The SSLCertStore and SSLCertSubject properties may also be used to specify a certificate.

When SSLCertEncoded is set, a search is initiated in the current SSLCertStore for the private key of the certificate. If the key is found, SSLCertSubject is updated to reflect the full subject of the selected certificate, otherwise SSLCertSubject is set to empty string.


setSSLCertEncoded

public void setSSLCertEncoded(byte[] SSLCertEncoded)
                       throws IPWorksSSLException
The SSL certificate (PEM/base64 encoded).

This property is used to assign a specific certificate for SSL client authentication (SSL server authentication in the case of the IPDaemonS bean). The SSLCertStore and SSLCertSubject properties may also be used to specify a certificate.

When SSLCertEncoded is set, a search is initiated in the current SSLCertStore for the private key of the certificate. If the key is found, SSLCertSubject is updated to reflect the full subject of the selected certificate, otherwise SSLCertSubject is set to empty string.

IPWorksSSLException

getSSLCertStore

public byte[] getSSLCertStore()
The name of the certificate store for the client certificate.

The SSLCertStoreType property specifies the type of the certificate store specified by SSLCertStore . If the store is password protected, specify the password in SSLCertStorePassword .

SSLCertStore is used in conjunction with the SSLCertSubject property in order to specify client certificates. If SSLCertStore has a value, and SSLCertSubject or SSLCertEncoded is set, a search for a certificate is initiated. Please refer to the SSLCertSubject property for details.

Designations of certificate stores are platform-dependent.

The following are designations of the most common User and Machine certificate stores in Windows:

MY
A certificate store holding personal certificates with their associated private keys.
CA
Certifying authority certificates.
ROOT
Root certificates.
SPC
Software publisher certificates.

In Java, the certificate store normally is a file containing certificates and optional private keys.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

If the provider is OpenSSL, the certificate store is a file containing a certificate and a private key. This property must be set to the name of the file.


setSSLCertStore

public void setSSLCertStore(byte[] SSLCertStore)
                     throws IPWorksSSLException
The name of the certificate store for the client certificate.

The SSLCertStoreType property specifies the type of the certificate store specified by SSLCertStore . If the store is password protected, specify the password in SSLCertStorePassword .

SSLCertStore is used in conjunction with the SSLCertSubject property in order to specify client certificates. If SSLCertStore has a value, and SSLCertSubject or SSLCertEncoded is set, a search for a certificate is initiated. Please refer to the SSLCertSubject property for details.

Designations of certificate stores are platform-dependent.

The following are designations of the most common User and Machine certificate stores in Windows:

MY
A certificate store holding personal certificates with their associated private keys.
CA
Certifying authority certificates.
ROOT
Root certificates.
SPC
Software publisher certificates.

In Java, the certificate store normally is a file containing certificates and optional private keys.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

If the provider is OpenSSL, the certificate store is a file containing a certificate and a private key. This property must be set to the name of the file.

IPWorksSSLException

getSSLCertStorePassword

public java.lang.String getSSLCertStorePassword()
The password for the certificate store (if any).

If the certificate store is of a type that requires a password, the value of this property is used to open the certificate store.


setSSLCertStorePassword

public void setSSLCertStorePassword(java.lang.String SSLCertStorePassword)
                             throws IPWorksSSLException
The password for the certificate store (if any).

If the certificate store is of a type that requires a password, the value of this property is used to open the certificate store.

IPWorksSSLException

getSSLCertStoreType

public int getSSLCertStoreType()
The type of certificate store for the client certificate.

This property can take one of the following values:

0 (sstUser - default)
For Windows, this specifies that the certificate store is a certificate store owned by the current user. For Java, this specifies that the certificate store is the name of a JKS (Java Key Store) file. If the provider is OpenSSL, this specifies that the certificate store is a file that contains PEM encoded certificate and private key.
1 (sstMachine)
The certificate store is a machine store (not available in Java and when provider is OpenSSL).
2 (sstPFXFile)
The certificate store is the name of a PFX (PKCS12) file containing certificates. If the provider is OpenSSL, the file may contain only one certificate and private key.
3 (sstPFXBlob)
The certificate store is a string (binary or base64 encoded) representing a certificate store in PFX (PKCS12) format.This setting is currently not supported when the provider is OpenSSL.

4 (sstPEMKey)
The certificate store is a string or filename that contains a PEM encoded certificate and private key.This store type is currently not supported in Java.


setSSLCertStoreType

public void setSSLCertStoreType(int SSLCertStoreType)
                         throws IPWorksSSLException
The type of certificate store for the client certificate.

This property can take one of the following values:

0 (sstUser - default)
For Windows, this specifies that the certificate store is a certificate store owned by the current user. For Java, this specifies that the certificate store is the name of a JKS (Java Key Store) file. If the provider is OpenSSL, this specifies that the certificate store is a file that contains PEM encoded certificate and private key.
1 (sstMachine)
The certificate store is a machine store (not available in Java and when provider is OpenSSL).
2 (sstPFXFile)
The certificate store is the name of a PFX (PKCS12) file containing certificates. If the provider is OpenSSL, the file may contain only one certificate and private key.
3 (sstPFXBlob)
The certificate store is a string (binary or base64 encoded) representing a certificate store in PFX (PKCS12) format.This setting is currently not supported when the provider is OpenSSL.

4 (sstPEMKey)
The certificate store is a string or filename that contains a PEM encoded certificate and private key.This store type is currently not supported in Java.

IPWorksSSLException

getSSLCertSubject

public java.lang.String getSSLCertSubject()
The subject of the certificate used for client authentication.

When this property is set, a search is performed in the current certificate store certificate with matching subject.

If an exact match is not found, the store is searched for subjects containing the value of the property.

When setting the property to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US

Example (Searching with partial subject)

 Control.CertSubject = "Test" 

If a match is not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

If a matching certificate is found, the SSLCertSubject property is set to the full subject of the matching certificate.


setSSLCertSubject

public void setSSLCertSubject(java.lang.String SSLCertSubject)
                       throws IPWorksSSLException
The subject of the certificate used for client authentication.

When this property is set, a search is performed in the current certificate store certificate with matching subject.

If an exact match is not found, the store is searched for subjects containing the value of the property.

When setting the property to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US

Example (Searching with partial subject)

 Control.CertSubject = "Test" 

If a match is not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

If a matching certificate is found, the SSLCertSubject property is set to the full subject of the matching certificate.

IPWorksSSLException

getSSLServerCert

public byte[] getSSLServerCert()
The server certificate for the last established connection.

SSLServerCert contains the server certificate for the last established connection.

SSLServerCert is reset every time a new connection is attempted.


getSSLServerCertStatus

public java.lang.String getSSLServerCertStatus()
The verification status of the server certificate for the last established connection.

When the verification fails, SSLServerCertStatus contains a string that indicates the reason(s) why, otherwise, it contains the string "OK".

Please note that the value of SSLServerCertStatus must be considered as only a suggestion as to the validity of the certificate. Application software must use its own logic to determine whether to accept the certificate or not, by using the SSLServerCert to access other certificate properties, or other application-specific information.

SSLServerCertStatus is reset an empty string every time a new connection is attempted.


getSSLStartMode

public int getSSLStartMode()
Determines how the bean starts the SSL negotiation.

The SSLStartMode property may have one of the following values:

0 (sslAutomatic - default)
If the remote port is set to the standard plaintext port of the protocol (where applicable), the bean will behave the same as if SSLStartMode is set to sslExplicit . In all other cases, SSL negotiation will be implicit ( sslImplicit ).
1 (sslImplicit)
The SSL negotiation will start immediately after the connection is established.
2 (sslExplicit)
The bean will first connect in plaintext, and then explicitly start SSL negotiation through a protocol command such as STARTTLS.
3 (sslNone)
No SSL negotiation, no SSL security. All communication will be in plaintext mode.


setSSLStartMode

public void setSSLStartMode(int SSLStartMode)
                     throws IPWorksSSLException
Determines how the bean starts the SSL negotiation.

The SSLStartMode property may have one of the following values:

0 (sslAutomatic - default)
If the remote port is set to the standard plaintext port of the protocol (where applicable), the bean will behave the same as if SSLStartMode is set to sslExplicit . In all other cases, SSL negotiation will be implicit ( sslImplicit ).
1 (sslImplicit)
The SSL negotiation will start immediately after the connection is established.
2 (sslExplicit)
The bean will first connect in plaintext, and then explicitly start SSL negotiation through a protocol command such as STARTTLS.
3 (sslNone)
No SSL negotiation, no SSL security. All communication will be in plaintext mode.

IPWorksSSLException

getSubject

public java.lang.String getSubject()
The subject of the mail message (optional).

The string in Subject is sent with a Subject SMTP header to the mail recipient.

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.


setSubject

public void setSubject(java.lang.String subject)
                throws IPWorksSSLException
The subject of the mail message (optional).

The string in Subject is sent with a Subject SMTP header to the mail recipient.

If the resulting header is longer thanMaxHeaderLength, then it is folded according to RFC 822 specifications.

IPWorksSSLException

getTimeout

public int getTimeout()
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion, or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an IPWorksException raises an IPWorksException exception .

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by theAbsoluteTimeoutconfiguration setting.

The default value for the Timeout property is 60 (seconds).


setTimeout

public void setTimeout(int timeout)
                throws IPWorksSSLException
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion, or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an IPWorksException raises an IPWorksException exception .

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by theAbsoluteTimeoutconfiguration setting.

The default value for the Timeout property is 60 (seconds).

IPWorksSSLException

getUser

public java.lang.String getUser()
A user id to login as in the MailServer .

If the User property is set to a non-empty string, then when connecting to the MailServer an AUTH or CRAM-MD5 (depending on the value of AuthMechanism ) command is sent in order to provide authentication information for the user.


setUser

public void setUser(java.lang.String user)
             throws IPWorksSSLException
A user id to login as in the MailServer .

If the User property is set to a non-empty string, then when connecting to the MailServer an AUTH or CRAM-MD5 (depending on the value of AuthMechanism ) command is sent in order to provide authentication information for the user.

IPWorksSSLException

config

public java.lang.String config(java.lang.String configurationString)
                        throws IPWorksSSLException
Sets or retrieves a beanconfiguration setting.

Config is a generic method available in every bean. It is used to set and retrieveconfiguration settingsfor the bean.

Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.

IPWorksSSLException

addAttachment

public void addAttachment(java.lang.String fileName)
                   throws IPWorksSSLException
Adds FileName as an attachment.

The Attachments property contains the full list of attachments.

Example (Adding an Attachment)

 Control.AddAttachment("C:\\file1.zip")
 Control.AddAttachment("C:\\file2.zip")
 Control.Send() 

is equivalent to:

 Control.AttachmentCount = 2
 Control.Attachments(1) = "C:\\file1.zip"
 Control.Attachments(2) = "C:\\file2.zip"
 Control.Send() 

IPWorksSSLException

connect

public void connect()
             throws IPWorksSSLException
Connects to the mail relay and sends the SMTP HELO command.

Connects to the mail relay and sends the SMTP HELO command, thus preparing for sending messages. Any number of messages can later be sent using the Send method.

Example (Connect and Send an Email)

 control.MailServer = "MyServer"
 control.From = "me@server.com"
 control.SendTo = "recipient@server.com"
 control.Subject = "My Subject"
 control.MessageText = "This is the message body"
 control.Connect()
 control.Send()
 control.Disconnect() 

IPWorksSSLException

disconnect

public void disconnect()
                throws IPWorksSSLException
Disconnect from the SMTP server.

Disconnects from the mail relay.

IPWorksSSLException

doEvents

public void doEvents()
              throws IPWorksSSLException
Processes events from the internal message queue.

When DoEvents is called, the bean processes any available events. If no events are available, it waits for a preset period of time, and then returns.

IPWorksSSLException

interrupt

public void interrupt()
               throws IPWorksSSLException
Interrupt the current method.

If there is no method in progress, Interrupt simply returns doing nothing.

IPWorksSSLException

processQueue

public void processQueue(java.lang.String queueDir)
                  throws IPWorksSSLException
Sends the messages which have previously been queued into QueueDir .

The PITrail event shows the interaction with the server as messages as are processed.

ProcessQueue looks for in the directory for files with extension ".queued" and starts processing them.

When processing starts, the file extension is changed to ".sending". If an error happens at this stage, the sending process is aborted, and the file extension is changed to ".failed".

If the file is successfully sent, the file is normally deleted, unless theKeepQueueconfiguration setting is set to True, in which case the file extension is instead changed to ".sent" and the queue file is not deleted.

IPWorksSSLException

queue

public java.lang.String queue(java.lang.String queueDir)
                       throws IPWorksSSLException
Queues the message into QueueDir .

The message is queued into a unique file into the directory QueueDir for future processing.

QueueDir must already exist, or an error will be generated.

The method returns the name of the unique queue file created in QueueDir . The file extension is ".queued".

Please refer to the ProcessQueue method for more information on email queue processing.

IPWorksSSLException

resetHeaders

public void resetHeaders()
                  throws IPWorksSSLException
Resets all the message headers to empty.

Resets all the message headers to "" (empty string). Use this property before creating a new message, so that headers from the previous message are not carried over to the next one.

IPWorksSSLException

send

public void send()
          throws IPWorksSSLException
Send the current message and MIME encoded attachment.

If the bean is not connected to the mail relay, a connection is created, the message is sent, and then the connection is closed unless an error occurs.

If the bean is already connected (by use of the Connect method), the connection will remain open after the message is sent. To disconnect, call the Disconnect method.

IPWorksSSLException

addFilemailersEventListener

public void addFilemailersEventListener(FilemailersEventListener l)
                                 throws java.util.TooManyListenersException
java.util.TooManyListenersException

removeFilemailersEventListener

public void removeFilemailersEventListener(FilemailersEventListener l)

IP*Works! SSL V6

Copyright (c) 2004 /n software inc. - All rights reserved.