www.element4solution.com

Package e4s.mail

Functionality for sending e-mail.

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.
 

Package e4s.mail Description

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:

SettingExampleDescription
MAIL.SMTP.HOSTsmtp.myserver.comThe mail host, using SMTP protocol
MAIL.SMTP.USERyournameThe login for your mailserver, a login is required to avoid open mail relays and most providers require an authentification for sending mails.
MAIL.SMTP.PASSWORD123The password associated with the MAIL.SMTP.USER.
MAIL.FROMyourname@myserver.comThe 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:

LibraryDescriptionSource
activation.jarJavaBeans Activation Frameworkhttp://java.sun.com/products/javabeans/glasgow/jaf.html
imap.jar
mailapi.jar
pop3.jar
smtp.jar
Java Mail APIhttp://java.sun.com/products/javamail/
mail.jarJava Mail APISee the Java mail API or look for other implementation dependent sources.


www.element4solution.com