See also: Configuring outgoing email
Replacing the default SMTP service
The bean used to send emails is named smtpService, it is by default of class org.esupportail.commons.services.smtp.AsynchronousSmtpServiceImpl. Deployers can write their own implementation of the interface SmtpService and declare the bean smtpService of this class in the configuration file /properties/smtp/smtp.xml.
In this case, allow the automatic recovering of the new class(es) and the configuration file /properties/smtp/smtp.xml when upgrading (cf Recovering previous configuration and customizations when upgrading).
Using several SMTP servers
The application can rely on several SMTP servers for redundancy:
- declare several beans of class org.esupportail.commons.services.smtp.SmtpServer (for instance named smtpServer1 and smtpServer2)
- declare those beans in the attribute servers of the bean smtpService
- allow the automatic recovering of the configuration file /properties/smtp/smtp.xml when upgrading (cf Recovering previous configuration and customizations when upgrading).
Change the look and feel of the emails
The steps to change the appearance of the emails sent are:
- edit the CSS stylesheet /properties/domain/emails.css
- allow the automatic recovering of this file when upgrading (cf Recovering previous configuration and customizations when upgrading).