Dynamo comes with a standard component of type SMTPEmailSender
, located at /atg/dynamo/service/SMTPEmail
. You can send your e-mail messages to the SMTPEmail
component, or you may create your own e-mailer component.
You can configure the SMTPEmail
component to define several default properties for the From
, Recipients
, Subject
, etc. If one of these default properties is set, then the default will be used in the case where the corresponding property is not set in the EmailEvent
. The defaultBody
property is an exception — if the defaultBody
property is set, then that defaultBody
will be prepended to all e-mail messages, whether they specify a body or not.
Note that the defaultFrom
and charSet
properties must be set to ASCII values. SMTPEmail
cannot send e-mail if either of these properties has a non-ASCII value.
The emailHandlerHostName
and the emailHandlerPort
properties should be set to the name of the host (usually remote) that will send the e-mail, and the port number it will use. The default value for emailHandlerHostName
is localhost
, and the default value for emailHandlerPort
is 25.
Some SMTP servers require authentication. If your SMTP server requires authentication, set the values of the username
and password
properties of the SMTPEmail
component to the username and password for the account it uses to send e-mail.
You may want to increase the waitForConnectionMillis
property to help reduce time-outs; the default is 5 seconds. This property is hidden and cannot be accessed through the ACC. To increase the setting, add the following to your <ATG2007.3dir>/home/localconfig/SMTPEmail.properties
file:
waitForConnectionMillis=30000