Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Anchor
Session Factory
Session Factory

Session Factory

In order to access the hibernate mappings used by the EmailService, you need to add the following property in the sesionFactory bean of your applicationContext:

Code Block
<property name="mappingLocations">
    <list>
        <value>classpath*:edu/mit/es/csf/email/hibernate/*.hbm.xml</value>
    </list>
</property>  
Tip

Need more information about session factory and hibernate mappings?  Go to the How to configure your application to use Hibernate Mappings for more information.

Panel

Email

attachments

Features

  1. CSF EmailService currently supports 2 types of attachment: list of File objects and list of attachments:
    • List of file objects:  use method sendEmailWithAttachments(EmailModel emailModel, List<File> attachments). There is also another method that supports attaching a file and generating email text with a velocity template.
    • List of datasource(s):  use method sendEmailWithAttachmentsFromDataSource(EmailModel emailModel, List<Datasource> attachments, Boolean useApplicationConfig).
  2. Sending bulk email (using the EmailModel object) with and without velocity template.