ejel
Class EmailSendingEventArgs

java.lang.Object
  extended by ejel.EventArgs
      extended by ejel.EmailSendingEventArgs

public class EmailSendingEventArgs
extends EventArgs

Sent as a part of the EventID.EID_SENDING event which is raised to the external listener before sending any email so it can adapt/alter or modify the email content before send it to recipients.


Constructor Summary
EmailSendingEventArgs(int acntIndex, int rcptIndex, Recipient[] rcpts, Email eml)
          EmailSendingEventArgs constructor
 
Method Summary
 int getAccountIndex()
          Gets the email account index in the main accounts list
 Email getCustomEmail()
          Gets the customizd Email object if set or null
 Email getOriginalEmail()
          Gets the original Email object
 Recipient getRecipientAt(int index)
          Gets the Recipient object at the index specified by the index param
 int getRecipientIndex()
          Gets the recipient object index in the main recipients list
 int getRecipientsCount()
          Gets the number of recipients to who the current email will be sent
 void setCustomEmail(Email email)
          Sets the customized Email object to be sent to recipients
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailSendingEventArgs

public EmailSendingEventArgs(int acntIndex,
                             int rcptIndex,
                             Recipient[] rcpts,
                             Email eml)
EmailSendingEventArgs constructor

Parameters:
acntIndex - Index of the email account in the main accounts list, used to send the email
rcptIndex - Index of the first recipient in the main recipients list
rcpts - Array of the Recipient objects list
eml - The Email object representing the original email content
Method Detail

getAccountIndex

public int getAccountIndex()
Gets the email account index in the main accounts list

Returns:
The email account index in the main accounts list

getRecipientIndex

public int getRecipientIndex()
Gets the recipient object index in the main recipients list

Returns:
The recipient object index in the main recipients list

getRecipientsCount

public int getRecipientsCount()
Gets the number of recipients to who the current email will be sent

Returns:
The number of recipients to who the current email will be sent

getRecipientAt

public Recipient getRecipientAt(int index)
                         throws java.lang.IndexOutOfBoundsException
Gets the Recipient object at the index specified by the index param

Parameters:
index - The index of the Recipient object to be retrieved
Returns:
The Recipient object at the index specified by the index param
Throws:
java.lang.IndexOutOfBoundsException

getOriginalEmail

public Email getOriginalEmail()
Gets the original Email object

Returns:
The original Email object

setCustomEmail

public void setCustomEmail(Email email)
Sets the customized Email object to be sent to recipients

Parameters:
email - The customized Email object to be sent to recipients

getCustomEmail

public Email getCustomEmail()
Gets the customizd Email object if set or null

Returns:
The customizd Email object if set or null