XMLWordPrintable

Details

    • Sub-task
    • Resolution: Unresolved
    • Major
    • 3.x Future
    • 2.17.0.Final
    • Java EE

    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 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: