
Public Member Functions | |
| void | addAttachment (ERMailAttachment attachment) |
| void | addInlineAttachment (ERMailAttachment attachment) |
| NSArray< ERMailAttachment > | attachments () |
| String | charset () |
| String | contextString () |
| ERMailDelivery () | |
| ERMailDelivery (javax.mail.Session session) | |
| NSArray< ERMailAttachment > | inlineAttachments () |
| void | newMail () |
| void | removeAttachment (ERMailAttachment attachment) |
| void | sendMail (boolean shouldBlock) |
| void | sendMail () |
| void | setAdditionalHeader (String headerKey, String value) throws MessagingException |
| void | setBCCAddresses (NSDictionary< String, String > bccAddresses) throws MessagingException, AddressException |
| void | setBCCAddresses (NSArray< String > bccAddresses) throws MessagingException, AddressException |
| void | setCCAddresses (NSDictionary< String, String > ccAddresses) throws MessagingException, AddressException |
| void | setCCAddresses (NSArray< String > ccAddresses) throws MessagingException, AddressException |
| void | setCharset (String charset) |
| void | setContextString (String contextString) |
| void | setDelegate (ERMessage.Delegate delegate) |
| void | setFromAddress (String fromAddress, String personalName) throws MessagingException, AddressException |
| void | setFromAddress (String fromAddress) throws MessagingException, AddressException |
| void | setInternetAddresses (NSArray< InternetAddress > addresses, Message.RecipientType type) throws MessagingException |
| void | setReplyToAddress (String toAddress, String personalName) throws MessagingException, AddressException |
| void | setReplyToAddress (String toAddress) throws MessagingException, AddressException |
| void | setSubject (String subject) throws MessagingException |
| void | setToAddress (String toAddress, String personalName) throws MessagingException, AddressException |
| void | setToAddress (String toAddress) throws MessagingException, AddressException |
| void | setToAddresses (NSDictionary< String, String > toAddresses) throws MessagingException, AddressException |
| void | setToAddresses (NSArray< String > toAddresses) throws MessagingException, AddressException |
| void | setUserInfo (NSDictionary< String, Object > userInfo) |
| void | setXMailerHeader (String xMailer) throws MessagingException |
| NSDictionary< String, Object > | userInfo () |
| String | xMailerHeader () throws MessagingException |
Public Attributes | |
| String | _charset = DefaultCharset |
Static Public Attributes | |
| static final String | DefaultCharset = System.getProperty("er.javamail.defaultEncoding") |
Protected Member Functions | |
| NSMutableArray< ERMailAttachment > | _attachments () |
| NSMutableArray< ERMailAttachment > | _inlineAttachments () |
| ERMessage | buildMessage () |
| void | finishMessagePreparation () throws MessagingException |
| InternetAddress | internetAddressWithEmailAndPersonal (String email, String personal) throws AddressException |
| MimeMessage | mimeMessage () |
| abstract DataHandler | prepareMail () throws MessagingException |
| javax.mail.Session | session () |
| void | setMimeMessage (MimeMessage message) |
| void | setSession (javax.mail.Session aSession) |
Protected Attributes | |
| NSMutableArray< ERMailAttachment > | _attachments |
| NSMutableArray< ERMailAttachment > | _inlineAttachments |
| MimeMessage | _mimeMessage |
Private Member Functions | |
| void | setAddresses (NSDictionary< String, String > addressesDictionary, Message.RecipientType type, boolean filterAddresses) throws MessagingException, AddressException |
| void | setAddresses (NSArray< String > addressesArray, Message.RecipientType type, boolean filterAddresses) throws MessagingException, AddressException |
Private Attributes | |
| String | _contextString |
| ERMessage.Delegate | _delegate |
| javax.mail.Session | _session |
| NSDictionary< String, Object > | _userInfo |
Static Private Attributes | |
| static final Logger | log = Logger.getLogger(ERMailDelivery.class) |
| ERMailDelivery | ( | javax.mail.Session | session | ) |
Designated constructor
| ERMailDelivery | ( | ) |
Default constructor
| NSMutableArray<ERMailAttachment> _attachments | ( | ) | [protected] |
| NSMutableArray<ERMailAttachment> _inlineAttachments | ( | ) | [protected] |
| void addAttachment | ( | ERMailAttachment | attachment | ) |
| void addInlineAttachment | ( | ERMailAttachment | attachment | ) |
| NSArray<ERMailAttachment> attachments | ( | ) |
| ERMessage buildMessage | ( | ) | [protected] |
| String charset | ( | ) |
| String contextString | ( | ) |
| void finishMessagePreparation | ( | ) | throws MessagingException [protected] |
| NSArray<ERMailAttachment> inlineAttachments | ( | ) |
| InternetAddress internetAddressWithEmailAndPersonal | ( | String | email, | |
| String | personal | |||
| ) | throws AddressException [protected] |
| MimeMessage mimeMessage | ( | ) | [protected] |
| void newMail | ( | ) |
Creates a new mail instance within ERMailDelivery
Reimplemented in ERMailDeliveryHTML.
| abstract DataHandler prepareMail | ( | ) | throws MessagingException [protected, pure virtual] |
Abstract method called by subclasses for doing pre-processing before sending the mail.
Implemented in ERMailDeliveryHTML, ERMailDeliveryPlainText, ERMailDeliveryWOComponentPlainText, and ERWOMailDelivery.MimeMessageMailDelivery.
| void removeAttachment | ( | ERMailAttachment | attachment | ) |
| void sendMail | ( | boolean | shouldBlock | ) |
Method used to construct a MimeMessage and then send it. This method can be specified to block until the message is sent or to add the message to a queue and have a callback object handle any exceptions that happen. If sending is blocking then any exception thrown will be wrapped in a general NSForwardException.
| shouldBlock | boolean to indicate if the message should be added to a queue or sent directly. |
| void sendMail | ( | ) |
Sends the mail immediately. The message is put in a FIFO queue managed by a static threaded inner class
| javax.mail.Session session | ( | ) | [protected] |
Sets an additional custom header element for the message.
| header | header key | |
| value | value to set |
| void setAddresses | ( | NSDictionary< String, String > | addressesDictionary, | |
| Message.RecipientType | type, | |||
| boolean | filterAddresses | |||
| ) | throws MessagingException, AddressException [private] |
Sets addresses regarding their recipient type in the current message. Has the option to filter the address list based on the white and black lists.
| void setAddresses | ( | NSArray< String > | addressesArray, | |
| Message.RecipientType | type, | |||
| boolean | filterAddresses | |||
| ) | throws MessagingException, AddressException [private] |
Sets addresses regarding their recipient type in the current message. Has the option to filter the address list based on the white and black lists.
| void setBCCAddresses | ( | NSDictionary< String, String > | bccAddresses | ) | throws MessagingException, AddressException |
Sets the bcc-addresses array for the current message instance
| void setBCCAddresses | ( | NSArray< String > | bccAddresses | ) | throws MessagingException, AddressException |
Sets the bcc-addresses array for the current message instance
| void setCCAddresses | ( | NSDictionary< String, String > | ccAddresses | ) | throws MessagingException, AddressException |
Sets the cc-addresses array for the current message instance
| void setCCAddresses | ( | NSArray< String > | ccAddresses | ) | throws MessagingException, AddressException |
Sets the cc-addresses array for the current message instance
| void setCharset | ( | String | charset | ) |
| void setContextString | ( | String | contextString | ) |
| void setDelegate | ( | ERMessage.Delegate | delegate | ) |
Sets the given delegate to listen to any messages that are created from this ERMailDelivery. This will automatically call ERMessage.setDelegate(delegate) for any ERMessage that is generated.
| delegate | the delegate to use for notifications |
| void setFromAddress | ( | String | fromAddress, | |
| String | personalName | |||
| ) | throws MessagingException, AddressException |
Sets the from address for the current message instance using an email and the personal name.
| void setFromAddress | ( | String | fromAddress | ) | throws MessagingException, AddressException |
Sets the from address for the current message instance
| void setInternetAddresses | ( | NSArray< InternetAddress > | addresses, | |
| Message.RecipientType | type | |||
| ) | throws MessagingException |
Sets addresses using an NSArray of InternetAddress objects.
| void setMimeMessage | ( | MimeMessage | message | ) | [protected] |
| void setReplyToAddress | ( | String | toAddress, | |
| String | personalName | |||
| ) | throws MessagingException, AddressException |
Sets the reply-to address for the current message instance
| void setReplyToAddress | ( | String | toAddress | ) | throws MessagingException, AddressException |
Sets the reply-to address for the current message instance
| void setSession | ( | javax.mail.Session | aSession | ) | [protected] |
| void setSubject | ( | String | subject | ) | throws MessagingException |
Sets the subject for the current message instance
| void setToAddress | ( | String | toAddress, | |
| String | personalName | |||
| ) | throws MessagingException, AddressException |
Sets the to address for the current message instance using an email and the personal name.
| void setToAddress | ( | String | toAddress | ) | throws MessagingException, AddressException |
| void setToAddresses | ( | NSDictionary< String, String > | toAddresses | ) | throws MessagingException, AddressException |
Sets the to-addresses array for the current message instance
| void setToAddresses | ( | NSArray< String > | toAddresses | ) | throws MessagingException, AddressException |
Sets the to-addresses array for the current message instance
| void setUserInfo | ( | NSDictionary< String, Object > | userInfo | ) |
Sets the userInfo dictionary for this ERMailDelivery. This userInfo is passed through to any ERMessage that is created by this ERMailDelivery, which can be used by delegates to get additional information about the message.
| userInfo | the userInfo dictionary |
| void setXMailerHeader | ( | String | xMailer | ) | throws MessagingException |
Sets the X-Mailer header for the message. Useful for tracking which mailers are sending messages.
| xMailer | value to set |
| NSDictionary<String, Object> userInfo | ( | ) |
| String xMailerHeader | ( | ) | throws MessagingException |
Gets the X-Mailer header set on the MimeMessage.
NSMutableArray<ERMailAttachment> _attachments [protected] |
NSArray of ERMailAttachment that must be binded to the message as ATTACHEMENT.
String _contextString [private] |
ERMessage.Delegate _delegate [private] |
NSMutableArray<ERMailAttachment> _inlineAttachments [protected] |
NSArray of ERMailAttachment that must be binded to the message as INLINE.
MimeMessage _mimeMessage [protected] |
Content of sent mail. In one instance of ERMailDelivery, when creating multiple mails, you must be sure to call newMail () method before send a new mail in order to have a cleared fresh mail
javax.mail.Session _session [private] |
JavaMail session
final String DefaultCharset = System.getProperty("er.javamail.defaultEncoding") [static] |
final Logger log = Logger.getLogger(ERMailDelivery.class) [static, private] |
1.5.8