Details

    Description

      It would be good to have a command to quickly add a new MailSessionDefinition to allow sending an email :

      email-add-session-definition --named java:comp/myMailSession --host smtp.gmail.com --transportProtocol smtps
      

      This will create a new class called org.myproject.email.MailResources if it doesn't exist, and will add a new MailSessionDefinition :

      package org.myproject.email;
      
      @MailSessionDefinitions({
            @MailSessionDefinition(
                  name = "java:comp/myMailSession",
                  host = "smtp.gmail.com",
                  transportProtocol = "smtps"
                  )
      })
      public class MailResources {
      } 
      

      Tying the command a second time will add a new MailSessionDefinition to the exiting MailSessionDefinitions :

      package org.myproject.email;
      
            @MailSessionDefinition(
                  name = "java:comp/myMailSession",
                  host = "smtp.gmail.com",
                  transportProtocol = "smtps"
                  ),
            @MailSessionDefinition(
                  ...
                  )
      })
      public class MailResources {
      } 
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            agoncal Antonio Goncalves
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: