|
www.element4solution.com | ||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
See:
Description
| Interface Summary | |
|---|---|
| AEP_ReceiveMail | Application exit point for receiving mails including a notification mechanism. |
| E4MailSettings_Intf | |
| Class Summary | |
|---|---|
| E4MailSettings | System settings for mail functions. |
| E4ReceiveMail | Receive email by installing one ore more event handlers. |
| E4SendMail | Send an email. |
Functionality for sending e-mail.
The mail package makes use of the javamail products by Sun Microsystems.
To send an email, you can use class e4s.mail.SendMail which encapsulates the send process, using plain text or html formatted messages. Plain text messages can also include attachments.
An example implementation can be found in the tutorial at e4s.tutorial.Example_Mail.
Parameters required in the .ini file:
The parameters are stored in the system .ini file, and can be accessed using class e4s.mail.MailSettings. The following settings are required within the .ini file:
| Setting | Example | Description |
| MAIL.SMTP.HOST | smtp.myserver.com | The mail host, using SMTP protocol |
| MAIL.SMTP.USER | yourname | The login for your mailserver, a login is required to avoid open mail relays and most providers require an authentification for sending mails. |
| MAIL.SMTP.PASSWORD | 123 | The password associated with the MAIL.SMTP.USER. |
| MAIL.FROM | yourname@myserver.com | The sender's email address, this can be overridden using the SendMail class but it is required as a default value. Note, that some mail programms require a from address associated and matching the current user to support transportation of the message. This depends on the mail server and the settings used. |
Additional java libraries required in your project:
Make sure, that you include the following libraries in your project's library at runtime:
| Library | Description | Source |
| activation.jar | JavaBeans Activation Framework | http://java.sun.com/products/javabeans/glasgow/jaf.html |
| imap.jar mailapi.jar pop3.jar smtp.jar | Java Mail API | http://java.sun.com/products/javamail/ |
| mail.jar | Java Mail API | See the Java mail API or look for other implementation dependent sources. |
|
www.element4solution.com | ||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||