1 Reply Latest reply on Nov 25, 2004 9:41 AM by john doe

    Howto send Mails from an module

    lcb Newbie

      I want to send mails from an modul. I have seen that the core provides an mail modul and i think its a good way to reuse this modul.
      But how to use it and where to settup?
      The local.properties does not contain setup params for mail.
      Can somebody give an example?
      And is it possible to add attachments to an mail?

        • 1. Re: Howto send Mails from an module
          john doe Newbie

          Take a look at usermodule.java in core/user.
          It creates a mail using MBean properties to configure.
          Avoid deployment descriptor modifications (XXX-service.xml) as MBean properties has precedence. Use jmx-console instead.

          You'll have to complete mail module properties : mode (most important), user, password, gateway if needed, validatefrom, validatesubject

          Exemple with use of plain mail account : mode=1, smtpuser=username, smtppassword=password

          See usermodule code, it's self-explanatory.
          For attachments, I think it's not provided by mail module.